Request sed help


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Request sed help
# 1  
Old 03-08-2005
Request sed help

Hi,

I've got two values say "var1" and "var2".

I want to replace the occurence of "var1" in the header of a file with "var2".

Something like this -

head -1 header.dat | sed "/s/$var1/$var2"

which I know is wrong. Can someone help me out here.

Thx
# 2  
Old 03-08-2005
You were close...
sed "s/$var1/$var2/"
# 3  
Old 03-08-2005
MySQL Thanks

Thanks Perderabo. It worked.

Yup, as u said... so close ... yet so far ... Smilie

Thx.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Forum Support Area for Unregistered Users & Account Problems

Registration request.

Hi, i got several questions regarding Solaris 10 configuration which i would like to ask here. Unfortunately Russia is blacklisted so I cannot register the normal way. My IP is: 5.19.nnn.nnn email: <removed> Thank you. (5 Replies)
Discussion started by: nongrato
5 Replies

2. Solaris

Request

hai is there any way to download and test vcs and vxvm in vmware x86 solaris 10 for education purpose only. i want to learn and practice in my pc. is there any alternate ways have guide me. (1 Reply)
Discussion started by: samiulla
1 Replies

3. High Performance Computing

request more nodes

I am new to cluster commands. But I have tried utilizing: -pe, but I do not know my parallel computing environment. We are running SGE, is there a simpler command to request more nodes? also: qsub -N auto -M name@email.com -m abe auto.sh does not email me at all. Help would be appreciated (0 Replies)
Discussion started by: theawknewbie
0 Replies

4. UNIX for Advanced & Expert Users

Request for Recommendations

Hello Guru's, I created this shell script to copy over the files from one location to other location and generating a list of files to process them through ETL tool. Could you please review the code and tell me if you have any recommendations or changes for my code or any thing wrong in my code.... (1 Reply)
Discussion started by: Ariean
1 Replies

5. Post Here to Contact Site Administrators and Moderators

Name change request

Hello, i'd like to have my forum name changed to Autocross.US to match my name on other Unix/Linux related forums. TIA, jim (5 Replies)
Discussion started by: Autocross.US
5 Replies

6. UNIX for Dummies Questions & Answers

urgent request

While executing a ksh file with a input parameter in background like the following bash-2.03$nohup fil.ksh 4 & the nohup session is stopped. The same ksh file while executed like bash-2.03$fil.ksh 4 works fine. I am trying the above in Solaris 5.8 in bash shell. Please let me... (2 Replies)
Discussion started by: kkna
2 Replies

7. Post Here to Contact Site Administrators and Moderators

Request

Hi; I'd like to change my user name. How can i do that? (1 Reply)
Discussion started by: moe2266
1 Replies

8. UNIX for Advanced & Expert Users

a request for help...

Hi, An evil person hacked into my computer last night-- I had a 2nd user account which I used only to allow clients to scp files to me, and this account had a rather 'dumb' password... This was the account that got hacked, anyway, my mailq was filled with thousands of spam emails, so I... (1 Reply)
Discussion started by: patrick99e99
1 Replies
Login or Register to Ask a Question