Remove empty lines from a file
You can use awk to strip a file of empty line. Do it with awk ‘NF>0’ < text_file
You can use awk to strip a file of empty line. Do it with awk ‘NF>0’ < text_file
Sed can be wonderful. Say you want to extract lines 34 through 78 from a text file and output them into another file. Do it with sed -n ‘34,78p’ < original.file > output.file
This is a nice trick to easily access information about your multimedia files. Install the mplayer package then add the following to your ~/.bashrc file: idmedia(){ mplayer -identify -frames 0 -ao null -vo null -vc dummy “$@” 2>/dev/null | grep ID_ } Now run it like idmedia file.mp3 (this tip was sent in by lockw3)
Creating a file with a different timestamp could be required in your distant future. However, when and if you are required to make one, you can do it with touch -c -t 0811141443 filename Let’s break down the numbers: 0811141443 = YYMMDDHHMM = 2008, November the 14th, 14:43