Skip to content

Commit

Permalink
selcol added
Browse files Browse the repository at this point in the history
  • Loading branch information
0ki committed Apr 3, 2020
1 parent c3b8c1b commit 5a77da9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ This section is included because it may be impossible to understand what some of
* `range <n>` generates all n-digit numbers from 000...000 to 999...999; like `seq` but prints "004" instead of "4"
* `renamelinks <perlexpr> <files ..>` takes `rename` syntax but changes the symlink string instead of renaming the file
* `rir2nmap` converts whois inetnum/NetRange/etc. output (e.g. "8.0.0.0 - 8.127.255.255") to format that nmap can take as a parameter (e.g. 8-8.0-127.0-255.0-255)
* `selcol <n1,n2,n3>` prints only selected columns (alias for awk '{print $n1,$n2,$n3}')
* `sftp-once [params] [user@]<host>` makes sftp connection to host without verifying or saving keys
* `shqueue` asynchronously executes long-running shell commands one-by-one; first instance will become the server, the others will be clients
* `skiprows <n>` skip first n rows
Expand Down
2 changes: 2 additions & 0 deletions selcol
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
awk '{print '$(echo $* | sed -E 's/ /,/g;s/,+/,/g;s/([0-9]+)/\$\1/g')'}'

0 comments on commit 5a77da9

Please sign in to comment.