Skip to content

A collection of usefull GNU/Linux shell tools for Microsoft Windows, such as grep, sed, awk ...

License

Notifications You must be signed in to change notification settings

aijit/Shell4Win

Repository files navigation

A collection of some usefull GNU/Linux shell tools for Microsoft Windows. Besieds a windows porting version of gnu/bash, WSH.

配置说明

为使 dos 窗口支持中文,需要在控制面板中设置 【时钟和区域】-【管理】-【更改系统区域设置】- 勾选【Beta: 使用 Unicode UTF-8 提供全球语言支持】。

双击运行 bat 脚本,以完成相应配置步骤(重复双击运行不影响最终效果):

config.bat

  • 添加用户环境变量 SHELL4WIN,值为 shell4win 目录的绝对路径

    SHELL4WIN=dir/to/shell4win/

  • 将所有可执行文件路径,添加到用户 PATH 环境变量

    %SHELL4WIN%/bin; %SHELL4WIN%/awk; %SHELL4WIN%/grep; %SHELL4WIN%/coreutils; ...

  • 添加工具推荐环境变量

    LS_OPTIONS=-bhC --color=auto

    GREP_OPTIONS=--color=always

config.reg.bat

lscolors.bat

在 dos 环境下执行以下命令,将 dircolors 配色文件中的内容,写入用户环境变量 LS_COLORS 中,从而改变 ls 命令输出配色。

lscolors.bat <scheme_file>

配色方案Solarized dircolors | Monokai Pro for vscode

命令列表

General : ls | dircolors | dir | grep | sed | awk | file | mandoc | unrar | zip | uzip | make

GNU/findutils : find | locate | xargs

GNU/coreutils

File utilities : chgrp | chown | chmod | cp | dd | df | du | install | ln | ls | mkdir | mkfifo | mknod | mv | rm | rmdir | shred | sync | touch | vdir

Text utilities : cat = ct | cksum | comm | csplit | cut | expand | fmt | fold | head | join | md5sum | nl | od | paste | ptx | pr | shasum | sort | split | sum | tac | tail | tr | tsort | unexpand | uniq | wc

Shell utilities : [ | basename | chroot | date | dirname | echo | env | expr | factor | false | groups | hostid | hostname | id | logname | nice | nohup | pathchk | pinky | printenv | printf | pwd | seq | sleep | stty | su | tee | test | true | tty | uname | users | who | whoami | yes

win-bash : ansi2knr | bash | bc | bison | cmp | cpp | dc | diff | diff3 | flex | fltcr | gplay | gsar | gunzip | gzip | indent | jwhois | less | logname | m4 | mvdir | paste | recode | rman | sdiff | sed | sh | shar | tar | type | unshar | uudecode | uuencode | wget | which

  • win-bash 对 windows 原生特性有较好的支持:

    • 继承了 windows 环境变量

    • 可调用 windows 现有 .exe .bat 程序

    • 使用以磁盘符开头的 windows 绝对路径格式

  • win-bash 有以下缺陷:

兼容程序

vim | openssh

About

A collection of usefull GNU/Linux shell tools for Microsoft Windows, such as grep, sed, awk ...

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published