find . -maxdepth 1 -type f | rename 's/ /-/g'
20101028
20100529
20100413
Sending mail using mutt
mutt -s "subject" -a filename1 -a filename2 email@example.com -c ccdemail@example.com -i filenamecontainingmessage.txt
20100319
20100318
Removing leading zero using awk
Had to extract data from rrdtool and feed it to Zabbix. Problem was I kept getting leading zero variables. This removes any leading zero:
to test it yourself:
rrdtool fetch lighttpd.rrd AVERAGE -s -60s \
| grep -v nan \
| grep -v Requests \
| awk '{printf "%d",$2}' \
| awk '{print $1 + 0}'
to test it yourself:
echo 000000105 | awk '{ print $1 + 0}'
20100316
Look for folders with world write bit on
$FIND $DIRNAME -xdev -perm +o=w ! \( -type d -perm +o=t \) ! -type l -print
Subscribe to:
Posts (Atom)