10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am having a two files and different days, and this is example:
file1: 06.09.2017.
abcd
123
file2: 07.09.2017.
abcd
1234
So what I want is that file2 with today's date contains only 1234, so where is a problem you would ask?
Problem is here that I put these commands into routers,. and... (3 Replies)
Discussion started by: tomislav91
3 Replies
2. Shell Programming and Scripting
I have some text files in a folder named ff as follows. I need to delete the lines (in-place editing)in these files based on another file aa.txt.
32bm.txt:
249 253 A P - 0 0 8 0, 0.0 6,-1.4 0, 0.0 2,-0.4 -0.287 25.6-102.0 -74.4 161.1 37.1 13.3 10.9
250... (2 Replies)
Discussion started by: aden
2 Replies
3. Shell Programming and Scripting
hey guys,
I tried searching but most 'search and replace' questions are related to one liners.
Say I have a file to be replaced that has the following:
$ cat testing.txt
TESTING
AAA
BBB
CCC
DDD
EEE
FFF
GGG
HHH
ENDTESTING
This is the input file: (3 Replies)
Discussion started by: DeuceLee
3 Replies
4. UNIX for Advanced & Expert Users
Hi All,
I have a very huge file (4GB) which has duplicate lines. I want to delete duplicate lines leaving unique lines. Sort, uniq, awk '!x++' are not working as its running out of buffer space.
I dont know if this works : I want to read each line of the File in a For Loop, and want to... (16 Replies)
Discussion started by: krishnix
16 Replies
5. Shell Programming and Scripting
Hi All,
I have some 30,000 files in one directory. The files look like this:
computer
networks
router
wire
I want to remove those files which have less than 200 lines for example in the above file, the number of lines is 4.
I am trying something like this:
find /path/to/dir -type f... (5 Replies)
Discussion started by: shoaibjameel123
5 Replies
6. Shell Programming and Scripting
Simply, I have a directory of text files and I need to delete every line in every file containing a specific string. I want to write the modified files to an empty sub directory.
I can't seem to get the sed command to delete the lines containing the string, and not just the string, in other... (3 Replies)
Discussion started by: LMHmedchem
3 Replies
7. Shell Programming and Scripting
Hello,
I have a group of text files with many lines in each file.
I need to delete all the lines in each and only leave 2 lines in each file. (3 Replies)
Discussion started by: script_op2a
3 Replies
8. Shell Programming and Scripting
Sed: Delete lines in files that contain other than 'a-z' ,'0-9', '.' and '-'
Hello,
I'm looking for a shell command or maybe a small php loop to delete lines in files.txt (in the same directory) that contain character other then 'a-z' ,'0-9', '.' and '-'
All line that have characters like... (4 Replies)
Discussion started by: devlin
4 Replies
9. Solaris
hi all,
i have enabled audit in our server it is working fine,but now i want to reduce the space with out removing audit.i.e..i want to delete some lines from audit file. here if i use vi editer, audit is not geting up.
i want to delete the data i.e..logs for every 6 days in audit file
plz... (3 Replies)
Discussion started by: spandhan
3 Replies
10. Shell Programming and Scripting
Hi
I want to delete first five and last five lines in text files without opening the file and also i want to keep the same file name for all the files.
Thanks in advance!!!
Ragav (10 Replies)
Discussion started by: ragavendran31
10 Replies