Linux Commands
I need help with something. I was wondering if someone could help me. I am working with my linux system and I need to know what the following commands mean, meaning what will these commands do if they are executed successfully. I have typed out these commands but I dont understand what they mean can you please help me?
I do know a little bit I know that sed -n suppresses automatic printing of pattern space and I know that sed is a stream editor. These Commands are: sed -n ' /t2/p' ../passwd >passfile sed '/^$/d' ../project3 sed -n' /^$/!p' ../project3 sed -n '/^..*$/p' ../bigfile sed '/^\ *$/d' ../project3 Anyones help would be greatly appreciated. Samantha |
Welcome to regular expressions. The man page is your best place to start, though it is pretty terse, it will give a quick idea on the command its self.
http://www.regular-expressions.info/ is a very, very good jumping off point, I can't recommend it enough. By the way, the latter part of those commands (../filename) is a tad bizarre if you're running a lot of these, why not cd to where you need to be? |
Homework!!!
The best way to find out what those commands do would be to run them!!! What books or online resources are you using to learn SED? Here is my favorite: http://www.grymoire.com/Unix/ |
All times are GMT -5. The time now is 02:59 PM. |