10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Input file:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 (6 Replies)
Discussion started by: Sagar Singh
6 Replies
2. Shell Programming and Scripting
I am trying to combine lines with these conditions:
1. First line starts with text of "libname VALUE db2 datasrc" where VALUE can be any text.
2. If condition1 is met then continue to combine lines through a line that ends with a semicolon.
3. Ignore case when matching patterns and remove any... (5 Replies)
Discussion started by: Wes Kem
5 Replies
3. Shell Programming and Scripting
Hi,
I have got the below requirement. please suggest.
I have a file like,
Processing Item is:
/data/ing/cfg2/abc.txt
/data/ing/cfg3/bgc.txt
Processing Item is:
/data/cmd/for2/ght.txt
/data/kernal/config.klgt.txt
I want to process the above file to get the output file like,
... (5 Replies)
Discussion started by: rbalaj16
5 Replies
4. 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
5. 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
6. 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
7. Shell Programming and Scripting
I have a file that will sometimes contain a pattern. The pattern is this:
FRM CHK 0000
I want to find any lines with this pattern, delete those lines, and also delete the line above and the line below. (4 Replies)
Discussion started by: nickg
4 Replies
8. UNIX for Dummies Questions & Answers
I have a file that will sometimes contain a pattern. The pattern is this:
W/D FRM CHK 00
I want to find any lines with this pattern, delete those lines, and also delete the line above and the line below. (1 Reply)
Discussion started by: nickg
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