![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| passing a variable inside a variable to a function | KingVikram | UNIX for Dummies Questions & Answers | 2 | 01-14-2008 05:28 PM |
| How to replace variable inside the variable | mani_um | Shell Programming and Scripting | 31 | 08-09-2007 07:56 PM |
| Replace variable with a user defined variable | ce124 | Shell Programming and Scripting | 1 | 04-15-2007 11:56 AM |
| 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 |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#8
|
||||
|
||||
|
Any character (other than backslash or newline) can be used instead of a slash to delimit the regular expression and the replacement.
Code:
sed -e "s:?:$ORACLE_HOME:g" $file_name |
| Forum Sponsor | ||
|
|
|
#9
|
|||
|
|||
|
Thanks very much. Its resolved.
|
|
#10
|
|||
|
|||
|
What if I delete?
Quote:
Code:
sed ":$ORACLE_HOME: d" $file_name Code:
sed '/text/ d' $filename Code:
sed ':text: d' $filename |
|
#11
|
|||
|
|||
|
You can use any delimiter in the search string too, but you have to backslash it (don't ask me why).
Code:
sed '\:text:d' $filename |
|
#12
|
|||
|
|||
|
Thank you era for fast reply. And that works!
Thanks again. |
|
#13
|
|||
|
|||
|
Quote:
|
|
#14
|
|||
|
|||
|
how to delete line from file ( using variables)
hi i have a big file i need every time to cut number of lines related together and ta delete also first two lines in the file. for example : while ( $x <= $n) set var1 = ` cat file | sed '1,2d' | awk '{print $4}' | sed '$x,$d' ` @ x = $x + $t end it gives me an error with sed command which contains the variable ?????? can anyone help me!!!!!!!!!!!!!!!!!!!! |
|||
| Google The UNIX and Linux Forums |