sed problem


Trivia Category: Science: Gadgets
Difficulty: Easy
Microphones can be used not only to pick up sound, but also to project sound similar to a speaker.
True or False?

 
Thread Tools Search this Thread
# 8  
Can you post sample data that you are using and desired output?
# 9  
Solved!!

I've added two spaces between the number and removed the g from the end of script line. Please consider this code:

Code:
sed -e "s/ 4 /OFFICIAL_RATE/"


Last edited by leo_ultra_leo; 06-11-2012 at 05:04 AM.. Reason: to add more details
 

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sed Or Grep Problem OR Terminal Problem?

I don't know if you guys get this problem sometimes at Terminal but I had been having this problem since yesterday :( Maybe I overdid the Terminal. Even the codes that used to work doesn't work anymore. Here is what 's happening: * I wanted to remove lines containing digits so I used this... (25 Replies)
Discussion started by: Nexeu
25 Replies

2. Shell Programming and Scripting

sed problem

Hi i am stuck with a very silly problem :mad: below is my code echo 201010_1212_121.xml i need to replace xml with csv so i did echo 201010_1212_121.xml | sed 's/.*\.xml/.*\.csv/' echo 201010_1212_121.xml | sed 's/*.xml/*.csv/' echo 201010_1212_121.xml |... (4 Replies)
Discussion started by: aishsimplesweet
4 Replies

3. Shell Programming and Scripting

Problem with sed

Hi all, i am writing a shell script to replace a variable using sed command. The snippet is as follows:- # to find the value of APPDIR # APPDIR 's value needs to be changed x=`grep APPDIR /dir1/dir2/resp_cde.ats` # the new value of APPDIR new=/cd_e/fg/h # to replace APPDIR with... (4 Replies)
Discussion started by: vikasrout
4 Replies

4. Shell Programming and Scripting

Sed problem

Hi, On Solaris 10 I have some problems with awk and sed which work on Linux scripts: Config file: # Port(s) for accepting client connections RTSPPort=554 DefaultStorageFolder=/app/cdr Code: bash-3.00# awk -F"=" -v gr="888" '/RTSPPort/{$2=gr;}1' OFS="=" server.ini > server.ini.new... (11 Replies)
Discussion started by: potro
11 Replies

5. Shell Programming and Scripting

Problem in sed.

Hi All! I am trying to use shell variables in a sed statement, but facing an error.I used the double quotes instead if single quotes in the sed statement. # sed -i -e "s/password/$decoded/g;" $CATALINA_HOME/conf/server.xml sed: -e expression #1, char 11: unterminated `s' command # ... (5 Replies)
Discussion started by: nua7
5 Replies

6. Shell Programming and Scripting

Sed problem

Hi guys, I have a problem where by I need to remane a file by moving it to another location. For instance I have a file called change.txt changeA.txt changeB.txt and I need to change the name to change_a1.txt changeA_a2.txt changeB_a3.txt I need a sed regular expression that changes... (3 Replies)
Discussion started by: abch624
3 Replies

7. UNIX for Advanced & Expert Users

sed problem any on help

when I execute the following expression the sed don't work and the system don't give any error....why if then echo "hi" echo "$f"|sed -e 's/'"$g"'/'"$j"'/' -e 's/'"$b"'/'"$a"'/'>>file1 (4 Replies)
Discussion started by: Ehab
4 Replies

8. UNIX for Dummies Questions & Answers

Sed Problem

I AM TRYING TO APPEND THE HOSTNAME OF A UNIX SERVER I WORK WITH SO I COULD DO A LOADING INTO A DATABASE. THE COMMAND I AM USING IS df -k | sed 's/^/dataserver /' What I intend to do is append the hostname dynamically by using the hostname command instead of having to manually enter... (1 Reply)
Discussion started by: Chelsea
1 Replies

9. UNIX for Dummies Questions & Answers

sed problem

I Have a file named file1 in which I have abcd bcde fght hghg ejhf I need to ADD another line of text just below bcde. Here bcde is unique throughout file1. I have tried: sed -n /bcde'/{N;p;}' file1 to see the line below bcde. But how do I add a new line with text below this line. (1 Reply)
Discussion started by: run_time_error
1 Replies

10. Shell Programming and Scripting

again a sed problem

Hi, I have a file: prM: device = lp0 lp0: file = /dev/lp0 header = never pr1: device = dummy dummy: backend = tutu header = toto pr3: device = dummy dummy: backend = titi (8 Replies)
Discussion started by: Castelior
8 Replies

Featured Tech Videos