Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-29-2009, 12:58 PM   #1
LQ Newbie
Registered: May 2009
Posts: 1

Rep: Reputation: 0
Question 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.
Old 05-29-2009, 01:07 PM   #2
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
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.

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?
Old 05-29-2009, 02:03 PM   #3
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738

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:


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help for Windows cmd commands into Linux terminal commands. windowsNilo Linux - Software 2 07-02-2008 06:26 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:43 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration