LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux Commands (https://www.linuxquestions.org/questions/linux-newbie-8/linux-commands-729365/)

lizzythestar 05-29-2009 12:58 PM

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

jamescondron 05-29-2009 01:07 PM

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?

pixellany 05-29-2009 02:03 PM

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.