10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a reference file that needs to remain static and another file that may or may not have duplicate rows that match the reference file. I need help with a command that will delete any duplicate rows from the second file while leaving reference file intact
For example reference file would... (4 Replies)
Discussion started by: bjdamon
4 Replies
2. Shell Programming and Scripting
Hi All,
Need your Help. when i tried deleting lines from one file using another file i got this below error:
$ sed "s/\(.*\)/\/^&$\/d/" a.txt > x.tmp
$ sed -f x.tmp b.txt > target.txt
sed: 0602-405 There are too many commands for the /^111111|.12|.00$/d function.
a.txt:
111111|.11|.00... (5 Replies)
Discussion started by: HemaV
5 Replies
3. Shell Programming and Scripting
In Unix, how do I delete lines in a file that match a particular pattern without opening it. File contents are
foo line1
misc
whatever
foo line 2
i want to delete all lines that have the pattern "foo" without opening the file. File should eventually contain
misc
whatever (1 Reply)
Discussion started by: osbourneric
1 Replies
4. Shell Programming and Scripting
I developed a perl code..And the excerpt from it is given below...
open(HANDLE,$cmp_path) ; #reading the xml file from the file path
while($file_path = <HANDLE>)
I have list of XML files to read from a folder. It has some spaces inside the name of the file...I used "\"... (2 Replies)
Discussion started by: gameboy87
2 Replies
5. Shell Programming and Scripting
We have a server that logs transactions to a file. I want to write a script that will delete the first 50 lines of the file daily without renameing the file or moving the file. (8 Replies)
Discussion started by: daveisme
8 Replies
6. UNIX for Advanced & Expert Users
How I can delete 100 lines anywhere in a file without opening a file and without renaming the file. (11 Replies)
Discussion started by: Nirgude07
11 Replies
7. UNIX for Dummies Questions & Answers
I have a file with 65 sets of 35 coordinates, and would like to isolate these coordinates so that I can easily copy the coordinates to another file. The problem is, I've got a 9 line header before each set of coordinates (so each set is 44 lines long). There are a zillion threads out there about... (3 Replies)
Discussion started by: red baron
3 Replies
8. Shell Programming and Scripting
How do I delete all the lines after the line containing text ***DISCLOSURES*** . I want to delete this line too.
Thank you (2 Replies)
Discussion started by: reachsamir
2 Replies
9. Shell Programming and Scripting
Hi
I have a file & always I need to remove or delete last 2 lines from that file. So in a file if I have 10 lines then it should return me first 8 lines.
Can someone help me? (4 Replies)
Discussion started by: videsh77
4 Replies
10. Shell Programming and Scripting
Hi,
I need a help in deleting a line matching a particular pattern in a file using shell script without opening the file. The file is a .c/.cpp file. Is it possible?
Thanks (6 Replies)
Discussion started by: naan
6 Replies