10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi guys
I have a text file in the following format
what i would like ot do is iterate through the file deleting the lines containing only numbers. I have googled this and have been unable to find any help ( maybe its my search terms)
so if any one an give me a heads up i would... (3 Replies)
Discussion started by: dunryc
3 Replies
2. Shell Programming and Scripting
I want to delete 1 line above the paatern and 3 line below the pattern and the pattern line itself, on the whole 5 lines. If there are three patterns what to do and the final text file to be captured in a new file. (3 Replies)
Discussion started by: razen
3 Replies
3. Shell Programming and Scripting
I want to delete 1 line above the paatern and 3 lines below the pattern and the pattern line itself, on the whole 5 lines. If there are three patterns to be deleted what to do and the final text file to be captured in a new file. (1 Reply)
Discussion started by: razen
1 Replies
4. Shell Programming and Scripting
I am working on an assignment to pull all the records from excel sheet programatically and use the data for further calculations.
In this process, I first defined 10 records in excel sheet and executed the below code.
In the first run it is OK. But after deleting last few rows in excel sheet and... (0 Replies)
Discussion started by: giridhar276
0 Replies
5. Shell Programming and Scripting
Hello, im using ex to manipulate some text. Im trying to delete all the lines except those on which a certain regex can be found.
the important part of the script:
ex temp << 'HERE'
g/regex/p
HERE
this command prints the lines I want to end up with, but it doesnt delete the others.... (2 Replies)
Discussion started by: drareeg
2 Replies
6. Shell Programming and Scripting
hi all,
i have got a scenario in which i need to delete all the lines that ends with file names.
e.g.
input can be
cms/images/services_icons/callback.png
cms/cms/images/services_icons/sync.php
cms/cms/images/services_icons
and output should be
cms/cms/images/services_icons
... (13 Replies)
Discussion started by: kashifv
13 Replies
7. Shell Programming and Scripting
Hi All,
Please can anyone help me as am deleting a line in a file with the below script:
sed '/"$value"/d' redirects.virgin-atlantic.com.conf > olist
where $value is a variable where the pattern to be matched is stored.
I am not getting any error also but the line containing the pattern... (2 Replies)
Discussion started by: Shazin
2 Replies
8. Shell Programming and Scripting
Hi,
I have a file that gets automatically generated and it would look something like
sakjsd
adssad
{{word}}
sddsasd
dsdsasa
.
.
.
So basically what I want to do is just keep the stuff below the {{word}} marker. The marker includes the brackets. Is there any command to delete the... (3 Replies)
Discussion started by: eltinator
3 Replies
9. Shell Programming and Scripting
I am trying deleting lines from a text file using sed..
sed '/OBJECT="ABC/{N;N;N;d; }'
will do if i have to delete lines starting with Object and next 3 lines
but I was looking for a way to delet lines starting with OBJECT and all the lines till it reaches a blank lines ..or it reaches a... (8 Replies)
Discussion started by: ajnabi
8 Replies
10. Programming
I am spooling a file from oracle and trying to delete the last line of the spooled file which I am unable to do.
Problem is that this file can have multiple records each time and I have no way of knowing how many because the amount can vary. I had an idea of using a while loop to read the... (1 Reply)
Discussion started by: supercbw
1 Replies