10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
hi
I have 2 file with more than 10 columns for both
1st file
apple,0,0,0......
orange,1,2,3.....
mango,2,4,5.....
2nd file
apple,2,3,4,5,6,7...
orange,2,3,4,5,6,8...
watermerlon,2,3,4,5,6,abc...
mango,5,6,7,4,6,def.... (1 Reply)
Discussion started by: tententen
1 Replies
2. Shell Programming and Scripting
I've been looking through the forums for awhile now and looking at the man page for grep and egrep and not seeming to find this scenario so it might not be possible but figured I'd throw it out to get some ideas.
I'm looking for a way to search a file for 1st match (example below net self) and... (3 Replies)
Discussion started by: djzah
3 Replies
3. Shell Programming and Scripting
Hi all,
I have a log file say Test.log that gets updated continuously and it has data in pipe separated format. A sample log file would look like:
<date1>|<data1>|<url1>|<result1>
<date2>|<data2>|<url2>|<result2>
<date3>|<data3>|<url3>|<result3>
<date4>|<data4>|<url4>|<result4>
What I... (3 Replies)
Discussion started by: pat_pramod
3 Replies
4. 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
5. Shell Programming and Scripting
not getting anywhere with this
an xml file contains multiple clients set up with same tags, different values.
I need to parse the file for client foo, and change the value of tag "64bit" from false to true.
cat clients.xml
<Client type"FIX">
<ClientName>foo</ClientName>... (3 Replies)
Discussion started by: jack.bauer
3 Replies
6. 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
7. 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
8. UNIX for Dummies Questions & Answers
I have some trouble editing a line. My aim is to edit the first line of a file.It will look the code and if there are dummy characters at the begininng of line before < it will erase. It is a php code.For instance:
for instance if the first line is like
%^<?php>sadsa</php>, it will change it to... (6 Replies)
Discussion started by: king87
6 Replies
9. 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
10. 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