LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 05-29-2009, 12:58 PM   #1
lizzythestar
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.
Samantha
 
Old 05-29-2009, 01:07 PM   #2
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 70
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?
 
Old 05-29-2009, 02:03 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
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/
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:21 PM.

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