Bashing The Wildcard

This is quick note about wildcard usage for the  Linux command line particularly on  how to select/include some files among the others. Let say you have a directory  that contains the following files: $ls mh apache-log.tar.gz.00 apache-log.tar.gz.01 apache-log.tar.gz.02 apache-log.tar.gz.03 apache-log.tar.gz.04 apache-log.tar.gz.05 apache-log.tar.gz.06 apache-log.tar.gz.07 apache-log.tar.gz.08 apache-log.tar.gz.09 apache-log.tar.gz.10 apache-log.tar.gz.11 apache-log.tar.gz.12 apache-log.tar.gz.13 To copy the first 10 files,  […]

Log Files: Dealing with Inconsistent Field Delimeter

Salam, Log files are big. Processing  it  would be cumbersome especially if the field separator are not so unique. Take a look at contain of file example.log below : “”,6667,”Rembau, NSembilan,Malaysia”,”GET /phpmyadmin “,404 “”,80,”Selangor”,”GET /phpmyadmin/ ,200 “”,9090,”A. Star, Kedah, Malysia”,”GET /phpmyadmin/favicon.ico,404 “”,6667,”Malysia”,”GET /phpmyadmin/print.css,404 “”,993,”A. Star, Kedah, Malysia”,”GET /phpmyadmin/phpmyadmin.css.php?lang=en-utf-8,404 At first sight, anybody would agree to […]