An open API service indexing awesome lists of open source software.

https://github.com/skykery/linux-console

Tips & Tricks
https://github.com/skykery/linux-console

Last synced: 5 months ago
JSON representation

Tips & Tricks

Awesome Lists containing this project

README

          

# Linux-Console
Tips & Tricks

### replace all the blank lines // -i = alias for backup
`sed -i=backup '/^\s*$/d' filename`

### sort by 6nd key from a string as `s:s:s:s:s:key:... /n` and the 7nd key as secondary factor
`sort -t\: -k6,6n -k7,7n oldfile > newfile`

### replace \n with |
`sed -i=backup ':a;N;$!ba;s/\n/|/g' filename`