10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
PGW|PGW_CDR_|2017-06-23 141946|2017-07-17 131633|2017-08-21
PGW|PGW_CDR_|2017-06-23 141946|2017-07-17 131633|2017-08-21
PGW|PGW_CDR_|2017-06-23 141946|2017-07-17 131633|2017-08-21
PGW|PGW_CDR_|2017-06-23 141946|2017-07-17 131633|2017-08-21
PGW|PGW_CDR_|2017-06-23 141946|2017-07-17... (6 Replies)
Discussion started by: swathi reddy1
6 Replies
2. Shell Programming and Scripting
I need to remove double quoted strings from specific lines in a file. The specific line numbers are a variable. For example, line 5 of the file contains
A B C "string"
I want to remove "string". The following sed command works:
sed '5 s/\"*\"//' $file
If there are multiple... (2 Replies)
Discussion started by: rennatsb
2 Replies
3. Shell Programming and Scripting
Hi all,
I have a huge file(size more that 5GB).
I want to do some manupulation with the records and write to another file.
As the size of the file is huge and there is a space constraint in that directory, I want to delete that record from first file after writing it in to second file.... (3 Replies)
Discussion started by: gani_85
3 Replies
4. Shell Programming and Scripting
Hi
I want to delete a line from a txt file for which the line number is user input. Say when user selects 19, the 19th line would be deleted from the file. Can anyone please provide me with a sed one liner for the same... I tried sed -i. The interaction would be like this
Enter the line... (4 Replies)
Discussion started by: sudeep.id
4 Replies
5. UNIX for Dummies Questions & Answers
Hi
I want to delete a line from a txt file for which the line number is user input. Say when user selects 19, the 19th line would be deleted from the file. Can anyone please provide me with a sed one liner for the same... I tried sed -i. The interaction would be like this
Enter the line to... (1 Reply)
Discussion started by: sudeep.id
1 Replies
6. UNIX for Dummies Questions & Answers
I have this space delimited large text file with more than 1,000,000+ columns and about 100 rows. I want to delete all the cells that consist of just 2 (leave 2's that are not by themselves intact):
File before modification
aa bb cc 2 NA100 dd
aa b1 c2 2 NA102 de
File after modification... (1 Reply)
Discussion started by: evelibertine
1 Replies
7. UNIX for Dummies Questions & Answers
Hi All,
I have too many .gz files (test.gz).
Task is to remove first line of each file.
Can I do it without unzipping the files?
Your help is appreciated. (4 Replies)
Discussion started by: Chulamakuri
4 Replies
8. UNIX for Dummies Questions & Answers
Hello Everyone.
I am trying to display contains of a file from a specific line to a specific line(let say, from line number 3 to line number 5). For this I got the shell script as shown below:
if ; then
if ; then
tail +$1 $3 | head -n $2
else
... (5 Replies)
Discussion started by: grc
5 Replies
9. Shell Programming and Scripting
Hi Everybody,
I am trying to write a script that will get some perticuler data from a file and redirect to a file.
My Question is,
I have a Very huge file,In that file I have my required data is started from 25th line and it will ends in 100th line.
I know the line numbers, I need to get all... (9 Replies)
Discussion started by: Anji
9 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I want to delete a line in a file that contains a string. I tried:
grep -v "mystring" Myfile > Myfile
But this makes the Myfile empty. I read that I need to do something like:
grep -v "mystring" Myfile > Myfile.new
rm Myfile
mv Myfile.new Myfile
Is there a way to avoid creating a... (2 Replies)
Discussion started by: laiko
2 Replies