Skip to main content

Posts

Showing posts from November, 2012

Processing files with awk

http://www.kingcomputerservices.com/unix_101/processing_files_with_awk.htm For my case, I had to extract image date in format "yyyy-mm-dd".I ran following (SunOs): ls -E test.jpg |awk '{print $6}' ls -E test.jpg |awk '{print substr($6,1,4) substr($6,6,2) substr($6,9,2);}') var a = $(ls -E test.jpg |awk '{print $6}')