file, dos2unix, unix2dos, clear, ps, pgrep, pkill, gzip/gunzip/zcat, unzip, zip, xxd, column, iconv, start, egrep, fgrep, perl, id, python/python3 and wget for Skua Bash, the bash-compatible shell bundled with Skua on
Windows. Git Bash ships these (libmagic file 5.4x, dos2unix 7.x) and coding agents use them,
for example git ls-files | xargs file to see line endings. No existing Rust implementation gave
Git Bash's output, so these are small native programs written for that output.
-
file: text (ASCII, UTF-8, UTF-8 with BOM, ISO-8859, extended ASCII; CRLF/CR/LF terminators, no terminators, very long lines, escape sequences), scripts by#!(sh, bash, python, node, perl, ...), JSON, XML, HTML, PE/ELF/Mach-O executables (Mach-O without libmagic'sflags:<...>), PNG, GIF, JPEG, PDF, archives,empty,directory, symbolic links; anything else isdata. Options-b -L -h -i -N -F -f --mime-type --mime-encoding. Not done: libmagic's source-language guesses (C source), gzip header details. -
dos2unix/unix2dos(one program; the name picks the direction): in place,-n IN OUT, stdin to stdout,-q -k -f -b -r -m, binary files skipped, dos2unix 7.x messages. -
clear: Git Bash's ncursesclear(\e[H\e[2J\e[3Jfor xterm-like terminals,-x,-T,cygwin/screen/dumb, the same errors); names Git Bash's terminfo lacks are cleared like xterm. -
ps: Git Bash's (Cygwin)pstable layouts (default,-l,-f,-s,aux,-e,-p,-u) over all Windows processes (PID = Windows PID). -
pgrep/pkill(one code base): procps-ng behaviour (Git Bash has neither).-f -l -a -x -i -n -o -c -v -u -P ..., exit 0/1/2/3. Signals that end a process on Unix all terminate it; STOP/TSTP are refused. Never matches itself or an ancestor. -
gzip/gunzip/zcat(one program, the name picks the mode): GNU gzip 1.14 messages and exit codes; compressed bytes and sizes differ (miniz_oxide). No.Z. -
unzip: Info-ZIP UnZip 6.00 output (-l -v -Z -t -p -d -o -n -j -x ...). bzip2, deflate64, LZMA and encrypted entries are skipped. -
zip: Info-ZIP Zip 3.0 behaviour from its documentation (Git for Windows has no zip, so no reference run):-r -j -D -q -0..-9 -x -i -u -f -d -m -@ -T. No Zip64 writing, encryption or comments. -
xxd: byte-for-byte with Git Bash's xxd (all dump modes and-r). -
column: util-linux 2.40column(fill, table and JSON modes). -
iconv: Git Bash'siconv(GNU libiconv 1.19-compatible) behaviour for UTF-8/16/32, UCS, ASCII, Latin-1, Windows-125x, ISO-8859-x,//TRANSLIT,//IGNORE; CJK and a few others follow WHATWG tables; the//TRANSLITtable is Skua's own, generated from the Unicode Character Database (tools/gen_iconv_translit.py). -
start:cmd.exe /c start "" ARGSwith complete escaping;SKUA_START_DRY_RUN=1prints instead of running. -
egrep/fgrep:grep -E/grep -Flaunchers (the siblinggrep.exefirst, elsegrepon PATH). -
id: Git Bash's (GNU coreutils 8.32 on Cygwin)idwith Git for Windows' defaultnsswitch.conf: uid/gid from the process token with Cygwin's SID mapping (0x30000 + RIDfor local accounts, well-known SIDs fixed), user names from Windows accounts, no group names (cannot find name for group ID, status 1), the current user's groups = the primary group. All options, errors and statuses as Git Bash's;--versionsaysid (skua-tools). -
perl: launcher only. Runs Git for Windows' perl:SKUA_PERL, else the first Git for Windows install found (git.exeon PATH,%ProgramFiles%\Git,%LOCALAPPDATA%\Programs\Git,InstallPathunderHKLM/HKCU\SOFTWARE\GitForWindows, Scoop) that hasperl.exeinusr\bin,ucrt64\bin,mingw64\binorclangarm64\bin. An install is recognised bycmd\git.exeonly (the path Git for Windows promises to keep; 2.56 movedmingw64toucrt64). Not found: one line saying what was looked for, status 127. The lookup isskua_tools::gitwin. -
python/python3: launchers, not interpreters. Each finds a real Python and runs it with the same arguments, stdio and status: perPATHdirectory the asked-for name, then the other one (a python.org install or a venv haspython.exeonly), skipping the App Installer stubs inWindowsApps(zero-length app execution aliases that print an install hint or open the Microsoft Store) and copies of the launcher; then thepylauncher (py -3forpython3). No Python: one line and status 127, never a Store window. -
wget: GNU Wget's common options on top of Windows'curl.exe(%SystemRoot%\System32\curl.exe, else PATH):-q -v -nv -O FILE|- -P DIR --header -c --no-check-certificate -T -t -U --post-data --post-file, file name from the URL (index.html,name.1when it exists), redirects followed, exit status 0/1/2/3/4/5/8 as GNU Wget. Other options are refused with a message.--versionsays it is the skua-tools wget on curl, not GNU Wget.
Everything builds, is tested and packaged on x86_64-unknown-linux-gnu and aarch64-apple-darwin too (CI: .github/workflows/skua.yml); Windows behaviour is unchanged. Off Windows:
file,dos2unix/unix2dos,clear,gzip/gunzip/zcat,unzip,zip,xxd,column,iconvbehave as above.id,ps,pgrep,pkill: there is no Cygwin layout to reproduce, so each runs the system's own (the first onPATHthat is not itself) with the same arguments, in place of itself; none:NAME: command not found, status 127.perl:SKUA_PERL, else the system'sperlonPATH.python/python3: the asked-for name onPATH, then the other one (executable files only, copies of the launcher skipped); nopylauncher, no Store stubs.start: the desktop's opener (openon macOS,xdg-openelsewhere), once per argument; a leading""(the Windows title) is dropped.SKUA_START_DRY_RUN=1printsopen ARGlines.egrep/fgrep:grepnext to the binary, else onPATH.wget:curlonPATH.- A closed stdout (EPIPE) exits 141 as on Windows.
tools/package-unix.sh --target <triple> --out <dir> [--version <v>] builds the release binaries and writes skua-tools-<version>-<target>.tar.gz (bin/ with gunzip, zcat and unix2dos as links, LICENSE, THIRD-PARTY.txt from cargo-about, SHA256SUMS) and its .sha256.
Built for Skua's Windows bundle by Skua Bash's skua/build-uutils.ps1 (entry in skua/uutils.toml). MIT.