Archive for category Programming
[shell] removing ^M : Dos text to unix
Posted by HanaDaddy in Programming on August 24th, 2006
tr -d '\015' < inputfile > outputfile
Detecting ^M (\r\n)
Note that “^M” is “Cntrl+V and Enter” Key
#!/bin/sh if grep "^M" $1 > /dev/null then echo $1 contains DOS Carriage Return fi
[shell] find command
Posted by HanaDaddy in Programming on August 24th, 2006
Check $path folder for the files that are older that 7 days and delete them.
find $path 2>>$DLOG -mtime +7 ! -exec rm -rf {} \;check man page
Recent Comments