$ gzip -d < <(wget -q -O - http://list.iblocklist.com/?list=bt_level1&fileformat=p2p&archiveformat=gz) > bt_level1
[ https://www.gnu.org/software/bash/manual/bash.html#Process-Substitution ]
$ sudo cut --complement -d' ' -f 1-4 /var/log/messages-20140330| uniq -c -d|sort -g
$ find ~/.local/share/applications/ -type f -exec desktop-file-validate {} \;
$ echo 0 1 $#
ARGS="$@"
$ $? $ cmd && echo "success" || echo "error"
FIGL = ${PIPESTATUS[0]} ./generate-conf.pl -f 01-conf.conf -i -o | while read line; do echo "`date` ${line}" >> generate-conf.log; done if [ "${PIPESTATUS[0]}" == 1 ]; then echo "Generate Error!"; exit; fi echo "Generate successfull"
$ exit 0-255[int,0=success]
find /tmp -maxdepth 1 -mindepth 1 -type d -printf '%T@ %p\n' | sort -nk1| head -n -2| cut -d\\ -f2-
NOTE: maxdepth and mindepth in
find /tmp -maxdepth 1 -mindepth 1 ...
It's kinda hack to get rid of parent directory [ „/tmp“ here ].
NOTE: usage of head instead of tail
head -n -2
this way we keep always 2 in case of less subdirectories.