Linux Downloads & Tutorials Quick Search Engine :

Custom Search

NB:

You can Find ALL (Downloads,meaning,more posts)Quickly and easily With This Search engine.

*For Meaning Use : Meaning of 'WORD' .
*For Download Use : Download ' Product'
*For More Posts About A Subjet Use : Posts About 'WORD/SENTENSE')

Wednesday, April 29, 2009

Linux Commands text manipulation


sed 's/string1/string2/g'Replace string1 with string2

sed 's/\(.*\)1/\12/g'Modify anystring1 to anystring2

sed '/ *#/d; /^ *$/d'Remove comments and blank lines

sed ':a; /\\$/N; s/\\\n//; ta'Concatenate lines with trailing \

sed 's/[ \t]*$//'Remove trailing spaces from lines

sed 's/\([\\`\\"$\\\\]\)/\\\1/g'Escape shell metacharacters active within double quotes
seq 10 | sed "s/^/ /; s/ *\(.\{7,\}\)/\1/"Right align numbers

sed -n '1000p;1000q'Print 1000th line

sed -n '10,20p;20q'Print lines 10 to 20




sed -i 42d ~/.ssh/known_hostsDelete a particular line

sort -t. -k1,1n -k2,2n -k3,3n -k4,4nSort IPV4 ip addresses
echo 'Test' | tr '[:lower:]' '[:upper:]'Case conversion
tr -dc '[:print:]' < /dev/urandomFilter non printable characters
history | wc -lCount lines

YOU CAN USE QUICK SEARCH ENGINE IN THE TOP FOR MORE INFORMATIONS DOWNLOADS OR DETAILS.

No comments:

Post a Comment