|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
SED Command
(sed '' file1 | sort -o file2)
what is (sed '' file1) means? |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
Code:
cat file1 -- It could all be replaced by: Code:
sort file1 > file2 |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Thanks for the response. What exactly single quotes meaning in below command?
sed '' file1 |
|
#4
|
|||
|
|||
|
They mean what they always mean in a sh script. It's an empty string. sed never sees those quotes, but it is passed an empty string as its first argument. sed interprets this as an empty list of commands. Given no commands, and without the -n option, sed just prints each line it reads. In other words, as Scrutinizer mentioned, it behaves like cat.
Regards, Alister |
| Sponsored Links | ||
|
![]() |
| Tags |
| sed command with single quotes |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| When i am trying to execute export command within a shell script it is saying command not found. | dchoudhury | Shell Programming and Scripting | 4 | 06-18-2012 01:13 AM |
| passing command output from one command to the next command in cshell | kaaliakahn | UNIX for Dummies Questions & Answers | 2 | 02-10-2012 04:59 PM |
| unix command : how to insert text at the cursor location via command line? | xib.be | UNIX for Advanced & Expert Users | 0 | 12-22-2010 05:45 PM |
| Need help! command working ok when executed in command line, but fails when run inside a script! | 4dirk1 | Shell Programming and Scripting | 4 | 12-02-2010 05:47 AM |
| awk/sed Command : Parse parameter file / send the lines to the ksh export command | rajan_san | Shell Programming and Scripting | 4 | 11-06-2008 12:29 PM |
|
|