20 Aug 12:03
[OT] Awk question
From: Dan Track <dan.track <at> gmail.com>
Subject: [OT] Awk question
Newsgroups: gmane.linux.redhat.fedora.general
Date: 2008-08-20 10:03:58 GMT
Subject: [OT] Awk question
Newsgroups: gmane.linux.redhat.fedora.general
Date: 2008-08-20 10:03:58 GMT
Guys,
Just wondering if you could lend me a little hand. Basically I want to
rename a file from log.1 log.2 etc to log.10.36.34. The time stamp
(ignore the date) should be the last written time, so far I've got to
this stage:
stat log | sed -n '/Modify:/p' | awk -F ' ' '{print $3}'
so I get :
11:01:09.000000000
How can I get rid of the leading 0'swithout having to pipe the output
to anotehr awk statement, is it possible to do this withing the
current awk statement?
Thanks
Dan
--
--
fedora-list mailing list
fedora-list <at> redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
RSS Feed