![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| can anyone help with shell script command about searching word with grep command? | aintour | Shell Programming and Scripting | 2 | 10-14-2009 05:51 PM |
| problem with output of find command being input to basename command... | new_learner | UNIX for Dummies Questions & Answers | 2 | 12-14-2008 02:56 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 01:29 PM |
| assign a command line argument and a unix command to awk variables | sweta_doshi | Shell Programming and Scripting | 0 | 08-08-2008 07:54 AM |
| Help Required: Command to find IP address and command executed of a user | loggedout | Security | 2 | 08-06-2008 09:12 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi,
I am new to Unix scripting. I have a list as shown below. Now, I want to list only those words that doesnt start with "-". PGM_LIST=" \ cls/dw_realease1 \ cls/dw_realease2 \ -cls/dw_realease3 \ cls/dw_realease4 \ -cls/dw_realease5 \ cls/dw_realease6 \ " I tried this: echo $PGM_LIST | sed '/-/d' but its not giving correct results. Please help! I am using ksh |
|
||||
|
Yes, you are right, but I need to list all the words which doesnt start with "-"
So I want to see the output as: cls/dw_realease1 cls/dw_realease2 cls/dw_realease4 cls/dw_realease6 basically omitting cls/dw_realease3 and cls/dw_realease5 |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|