I address in this way those who like to bash and try to avoid extensive use of scripts. So everyone is invited to post here its own one line (or maybe two line) compound command. Here what I mean
Code:
$ alias lspkg='ls /var/log/packages | grep '; lspkg pyth
this one-liner should list many python packages installed. Here more complicated example I just run
Code:
$ for f in $(ls *.c ) ; do if [ `wc -l $f | cut -d' ' -f1` -lt 200 ] ; then echo $f ; fi ; done
word of explanation: it just looks through c source files and picks those with less than 200 lines of code. Here is the output in coreutils/src directory
Code:
basename.c
coreutils-arch.c
coreutils-dir.c
coreutils-vdir.c
cp-hash.c
dirname.c
false.c
find-mount-point.c
force-link.c
getlimits.c
group-list.c
groups.c
hostid.c
hostname.c
lbracket.c
libstdbuf.c
link.c
logname.c
ls-dir.c
ls-ls.c
ls-vdir.c
mkfifo.c
nproc.c
operand2sig.c
printenv.c
prog-fprintf.c
readlink.c
relpath.c
sleep.c
true.c
tty.c
uname-arch.c
uname-uname.c
unlink.c
users.c
version.c
whoami.c
yes.c
Basically to be one-liner means for me to create such things on demand, definitely not to try to memorize or - even worse - put this in auto-magical script. Why I posting in this forum? Slackware is just very well suited for such way of work. I hope idea is quite clear.
Final word: I plan all these sources file to convert to pdf (text2pdf from slackbuilds) - to create one book - maybe with some comments of mine - and copy to my tablet - and of course read in my spare time. Of course for educational purposes.