Search This Blog

Wednesday, February 2, 2011

linux sort a file

greg@SS:/site# sort cas.txt > cas2.txt

linux get file line number

greg@SS:/site# wc -l cas.txt
3725 cas.txt

grep regular expression space

greg@SS:/site# less APAC.txt | grep '[0-9]\{2,7\}-[0-9]\{1,2\}-[0-9]\{1\}' > abc.txt

greg@test:/test$ less filtered.txt | grep "^[0-9]\{1,10\}[[:space:]]\{1,20\}[0-9]\{2,7\}-[0-9][0-9]-[0-9]$" > filtered.txt1

html redirect

Add this line in your homepage header: 




<meta HTTP-EQUIV="REFRESH" content="0; url=http://www.yourdomain.com/">