1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-05-20 10:53:23 -07:00

add slit variant for tab-delimited inputs

This commit is contained in:
Connor Olding 2019-05-27 10:56:46 -07:00
parent 801d9b0c1c
commit 4a1d4cd289
2 changed files with 7 additions and 1 deletions

View File

@ -467,7 +467,7 @@ $ ~/sh/sc $(~/sh/scropt -s -d0.5)
(sh) sorts stdin and highlights similarities between adjacent lines.
### [slit](/sh/slit)
### [slit](/sh/slit) + [slitt](/sh/slitt)
(zsh) views specific columns of text.
via [pretzo.](https://github.com/sorin-ionescu/prezto/)
@ -484,6 +484,8 @@ tmpfs 1%
tmpfs 1%
```
`slitt` is exactly the same, but it works with tabs instead of spaces.
### [sram](/sh/sram)
(zsh) converts between a couple saveram formats for N64 emulators.

4
sh/slitt Normal file
View File

@ -0,0 +1,4 @@
#!/bin/zsh
# via: https://github.com/sorin-ionescu/prezto/
# this version uses tabs for input/output field separators.
awk "BEGIN { FS=\"\\t\"; OFS=\"\\t\" } { print ${(j:,:):-\$${^@}} }"