Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I'm writing my first ever script so I'm a bit of a novice, hopefully this problem is simple:
I need to take a number from one file, and place it in a specific location in another. I've got the script to extract the number, and intended to use something like sed to find the particular character string I want to replace with this number.
The proble is that the new string will be a number that I don't know, hence I can't just write the sed command to replace a specific character string.
I'm trying to define the replacement number as a variable that's set as an awk command:
VAR1= `awk 'NR==2 {print $1}' filename.plt`and then use:
sed (/string/,$VAR1,/string/) but I get permission denied messages.
I can run the exact same awk command myself, but it doesn't seem to like it in the script.
Any suggestions? Should I try a whole new track?
Thanks in advance

thanks immulett but it still gives me execute permission denied message.
should I try a different approach?

![]() |
UNIX command to display c...
|
alphabet calculation cmd
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |