10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i have lines in a file similar to this:
results=$(echo Total: ${res} | command | command)
now I need to add text before the word "results", but i dont know how to do it.
here's what i tried:
%s~results=.*echo Total:.* ${7}~PROCESS \; results=.*echo Total:.* ${7}~g
the problem is,... (1 Reply)
Discussion started by: SkySmart
1 Replies
2. Shell Programming and Scripting
Hi All,
I am trying to edit the next line when there is a success for a pattern.
For example:
<nvname>abc</nvname>
<nvvalue>1</nvvalue>
<nvname>def</nvname>
<nvvalue>2</nvvalue>
once there is a hit for the string "abc" the value of the nvvalue should be replaced with the value we... (5 Replies)
Discussion started by: pulgupta
5 Replies
3. Shell Programming and Scripting
I have a sample file as below :-
RECORD_COUNT|2660|28606946.86|20110701122349694|
adkad|wwsgesg|mkmk|FFFF|FAFAF|FFAF|FAFFFFA|5894858|
I have to replace the second coulmn in the first row which is the count of no of lines in the file from a new variable .
Also I have to delete the 3rd... (2 Replies)
Discussion started by: Sanjeev Yadav
2 Replies
4. UNIX for Dummies Questions & Answers
Hi All
I would like to break down each next line that matches SK1.chr* in this case NNNNNN.... into 100 characters each after SK1.chr*... (3 Replies)
Discussion started by: pawannoel
3 Replies
5. Shell Programming and Scripting
Hello,
i have a file, i open the file and read the line, i want to get the first item in the csv file and also teh third+6 item and wirte it to a new csv file. only problem is that using echo it takes TOO LONG:
please help a newbie. below is my code:
WorkingDir=$1
FileName=`cut -d ',' -f... (2 Replies)
Discussion started by: limamichelle
2 Replies
6. UNIX for Dummies Questions & Answers
hi. i'm using ksh with set -o vi. if i am far down in a directory and try to edit the command line (esc-k to retrieve previous command) the cursor is being positioned over to the left on top of the directory text making the text very difficult to read or work with. seems to be problem with long... (2 Replies)
Discussion started by: jeffa123
2 Replies
7. Shell Programming and Scripting
Hello I am trying to make an awk script that always replaces the same characters in a file, with white space in between. Can anyone write a script that prompts for the 3 numbers and then replaces them in the file?
eg.
enter a b c:
'it then puts a b c in the file.
The file format is always
... (12 Replies)
Discussion started by: gav2251
12 Replies
8. Shell Programming and Scripting
Hello everyone. I have been reading a lot about the various different text editors at my disposal through Unix, but I just can't seem to close the deal for what I am trying to do. Is there a way to issue a single line command to edit a file where pattern=x, and do it non-destructively AND in-place?... (1 Reply)
Discussion started by: gator76
1 Replies
9. Shell Programming and Scripting
Hi All,
Could you please help me out with this problem?
I need to edit the last line of my file.
Ex: The last line in my file will be say 000056000045 8
I need to subtract some number from the number 45 and replace the new number in its place.
... (1 Reply)
Discussion started by: Anitha Chandran
1 Replies
10. UNIX for Dummies Questions & Answers
Is there a way using bash that I can edit a command line using vi.
I.e. if I have a long command line and I want to edit it.....by typing vi and then having the command open in an editing window....
I beleive this can be done in k shell by pressing v....however can find out how this can be... (3 Replies)
Discussion started by: peter.herlihy
3 Replies