10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
In the awk below I am trying to remove all lines above and including the pattern Test or Test2. Each block is seperated by a newline and Test2 also appears in the lines to keep but it will always have additional text after it. The Test to remove will not. The awk executed until the || was added... (2 Replies)
Discussion started by: cmccabe
2 Replies
2. Shell Programming and Scripting
Sorry for the weird title but i have the following problem.
We have several files which have between 10000 and about 500000 lines in them. From these files we want to remove lines which contain a pattern which is located in another file (around 20000 lines, all EAN codes). We also want to get... (28 Replies)
Discussion started by: SDohmen
28 Replies
3. UNIX for Dummies Questions & Answers
I have a file like this - I want to remove the 2015 (or any four digit #) from column $4 so I can get:
Nov 05 1997 /ifs/inventory2/
for example. Im not sure how. Should I use an if statement with awk?
Jan 16 2015 23:45 /ifs/sql_file
Jan 16 2015 23:45 /ifs/sql_file
Nov 05 2015 1997... (4 Replies)
Discussion started by: newbie2010
4 Replies
4. Shell Programming and Scripting
I have one requirement to delete all lines from a file if it matches below scenario. File contains three column. Employee Number, Employee Name and Employee ID
Scenario is: delete all line if Employee Number (1st column) contains below
1. Non-numeric Employee Number
2. Employee Number that... (3 Replies)
Discussion started by: anshu ranjan
3 Replies
5. Shell Programming and Scripting
I have fileA:
Joey.smith /my/path/to/here here
bill@smith /my/path/to/there there
John@smith /my/path/to/anywhere anywhereI have fileB:
bill@smithI want to end with fileC:
Joey.smith /my/path/to/here here
John@smith /my/path/to/anywhere anywhereThus remove B from A, the whole line.
I've... (3 Replies)
Discussion started by: crowman
3 Replies
6. Shell Programming and Scripting
Hi,
I writing a shell program to remove the data from output of the find which matches a list in a file
I am using the below find command to get the list of files
x=`find . -name test*.dat`
the output of the find command is as follows
test1.dat
test2.dat
test3.dat
test4.dat... (4 Replies)
Discussion started by: pals70423
4 Replies
7. Shell Programming and Scripting
Hi,
I have more than 30,000 records in a flat file. I want to remove footer from the file by searching a string pattern for the footer.
Example.... let the flat file test.dat contains below records.
record1
record2
record3
..
..
..
record31000
Total records 31000
I want to remove the... (6 Replies)
Discussion started by: gani_85
6 Replies
8. Shell Programming and Scripting
Input file
matrix-remodelling_associated_8_
aurora_interacting_1_
L20
von_factor_A_domain_1
ATP_containing_3B_
.
.
Output file
matrix-remodelling_associated_8
aurora_interacting_1
L20
von_factor_A_domain_1
ATP_containing_3B
.
. (3 Replies)
Discussion started by: perl_beginner
3 Replies
9. Shell Programming and Scripting
I want a shell script that will traverse a file system starting at specific path.
And look at all file names for repeating sequences of and remove them from the file name.
The portion of the name that gets removed has to be a repeating sequence of the same characters.
So the script would... (3 Replies)
Discussion started by: z399y
3 Replies
10. Shell Programming and Scripting
hi,,
i hav a file with many lines.i need to remove all lines before a line begginning with a specific pattern from the file because these lines are not required.
Can u help me out with either a perl script or shell script
example:-
if file initially contains lines:
a
b
c
d
.1.2
d
e
f... (2 Replies)
Discussion started by: raksha.s
2 Replies