05-26-2010
I have already tried and it's doesn't work.
The command replaces TTFactivevent by $TTFav but $TTFav is a number and I want the number not the name of the variable. Do you have any idea ?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
HI,
Can't seem to find anything on the forums to fix this.
I have a file, one line within this will not have a specific string at the end.
I have the string, but need to append it to the specific line which has it missing.
I need to use a variable for this, $string - I am using double... (13 Replies)
Discussion started by: mandriver
13 Replies
2. UNIX for Dummies Questions & Answers
Hello Can Any1 help me.
I want to replace a specific character string inside a file at a specific location with a particular character with the help of a command or a shell script.
The tr command replaces a specific character with another for all the occurences of that character in the file.
I... (5 Replies)
Discussion started by: rahulrathod
5 Replies
3. Shell Programming and Scripting
I already have accomplished this task using sed and arrays, but since I get the variable using awk, I figured I'd ask this question and maybe I can get a cleaner solution using strictly awk.. I just can't quite grasp it in awk.
Story: I'm automating the (re)configuration of network interfaces,... (3 Replies)
Discussion started by: System Shock
3 Replies
4. Shell Programming and Scripting
Hello i need some help with the usage of sed.
Situation : 2 textfiles, file.in , file.out
In the first textfile which is called file.in are the words for the substitution.
Every word is in a new-line like :
Firstsub
Secondsub
Thridsub
...
In the second textflie wich is called file.out is... (5 Replies)
Discussion started by: Kingbruce
5 Replies
5. Shell Programming and Scripting
Hi All,
Was wondering how I can do the following....
I have a String as follows
"ACCTRL000005022RRWDKKEEDKDD...."
This string can be in a file called tail.out or in a Variable called $VAR2
Now I have another variable called $VAR1="000004785" (9 bytes long), I need the content of... (5 Replies)
Discussion started by: mohullah
5 Replies
6. Shell Programming and Scripting
Hey everyone!
Simple question - I am trying to use sed to replace two different strings. As it stands I can implement this as:
sed -i 's/TIMEOUT//g'
sed -i 's/null//g'
And it works. However, is it possible to shrink that down into a single command? Will there be any performance benefits? (3 Replies)
Discussion started by: msarro
3 Replies
7. Shell Programming and Scripting
Hi All,
I have a file having one line only.
It is like
trapsess:inform|10.232.167.18|1|1|50|25|0|0|0|5|1|1|78|0037|
I want to replace the numbers in last two columns by As.
It should look like
trapsess:inform|10.232.167.18|1|1|50|25|0|0|0|5|1|1|AA|AAAA|
Please, suggest me any shell... (12 Replies)
Discussion started by: mukeshbaranwal
12 Replies
8. Shell Programming and Scripting
Dear expert,
I need an urgent help.
I would like to update my /etc/ntp.conf file using sed.
1) if script find this string "127.127.1.0" then add the lone below
#server 127.127.1.0
2) is script find this string "fudge 127.127.1.0 stratum 10" then add
#fudge 127.127.1.0 stratum 10 ... (7 Replies)
Discussion started by: lamoul
7 Replies
9. UNIX for Dummies Questions & Answers
Here is my task, I feel sure this can be accomplished with see/awk but can't seem to figure out how.
I have large flat file from which I need to extract every case of a pairing of characters (GG) in this case PLUS the previous 20 characters. The output should be a list (which I plan to make... (17 Replies)
Discussion started by: Twinklefingers
17 Replies
10. Shell Programming and Scripting
Not able to paste my content. Please see the attachment :-( (2 Replies)
Discussion started by: vivek d r
2 Replies