![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 | Thread Starter | Forum | Replies | Last Post |
| "BOLD" printing a variable in PS1 command | pdtak | Shell Programming and Scripting | 4 | 03-17-2008 01:04 PM |
| passing a variable inside a variable to a function | KingVikram | UNIX for Dummies Questions & Answers | 2 | 01-14-2008 05:28 PM |
| Export command giving Variable Name vs the Value set for the Variable | ParNone | UNIX for Dummies Questions & Answers | 2 | 04-03-2006 08:43 AM |
| ksh: A part of variable A's name is inside of variable B, how to update A? | pa3be | Shell Programming and Scripting | 4 | 03-30-2005 08:29 AM |
| Printing Problems in unix ... ( Bar-cdoe - Ip Printing) | QuickSilver | UNIX for Advanced & Expert Users | 3 | 06-04-2002 07:48 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
sed not printing variable
I have the following string stored in a variable from a file
sbCvgXfsuupllsucpp11-aWa I want to use sed to search for the string in a second file: FileSys.dat sed -n "${obid}" FileSys.dat I'm getting "sed: command garbled: sbCvgXfsuupllsucpp11-aWa" The syntax seems fine...anyone know why sed cannot execute the above? thanks |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
sed doesn't have a sbCvgXfsuupllsucpp11-aWa command listed on my sed man page.
grep sbCvgXfsuupllsucpp11-aWa /path/to/file fgrep would probably be faster. A sed command to do this would be something like: sed -n "/sbCvgXfsuupllsucpp11-aWa/p" |
|
#3
|
|||
|
|||
|
got sed to print my variable
Perderabo,
I just got sed to print my variable by adding double quotes around my / sed -n "/${obid}"/p" FileSys.dat thanks, |
|||
| Google The UNIX and Linux Forums |