10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Gents,
I am trying to delete all lines which start with "H" character, but keeping the fist header. Example In the input file I will delete all lines starting from line 8 which contents character "H" to the end of the file.
I try
sed '8,10000{/^H/d;}' file
But as don't know the end... (1 Reply)
Discussion started by: jiam912
1 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
Hi
I have a file like
# vi require.txt
1,BANK,Read blocks that cycle.
yellow
Read blocks.
2,ACCOUNT,Finished
Red
Finished .
3,LOAN, pipe
white
pipe
4,PROFIT,Resolve.
black
Resolve
Am using like
cat require.txt | grep -w ACCOUNTThe output I get is (8 Replies)
Discussion started by: Priya Amaresh
8 Replies
4. UNIX for Dummies Questions & Answers
Dear everyone,
I have a file with 900 lines (there is only numbers in one line, no string),
I only need the lines 2+3n (n=0,1...296), i.e line 2, 5, 8, 11...888.
I tried google but only the results such as how to delete all the odd lines or all the even lines with 'awk' command.
Thanks in... (4 Replies)
Discussion started by: phamnu
4 Replies
5. Shell Programming and Scripting
Hi, just tried some script, awk, sed for the last 2 hours and now need help.
Let's say I have a huge file of 800,000 lines like this :
It's a tedious job to look through it, I'd like to remove those useless lines in it as there's a few thousands :
Or to be even more precise :
if line1 =... (6 Replies)
Discussion started by: Zurd
6 Replies
6. HP-UX
I have one file which is having content as following...
0513468211,,,,20091208,084005,5,,2,3699310,
0206554475,,,,20090327,123634,85,,2,15615533
0206554475,,,,20090327,134431,554,,2,7246177
0103000300,,,,20090523,115501,89,,2,3869929
0736454328,,,,20091208,084005,75,,2,3699546... (7 Replies)
Discussion started by: ganesh.mandlik
7 Replies
7. Shell Programming and Scripting
How can I delete those lines that starts with a certain letter?
abc def ghi
xyz abc def
ace gik moq
abe imq gxm
I want to delete the line that starts with "x". Thanks! (4 Replies)
Discussion started by: kingpeejay
4 Replies
8. Shell Programming and Scripting
Hi,
I have a file ( all_users.ldif ) of the following format:
cn=orcladmin, cn=Users, dc=maximus,dc=com
cn=PUBLIC, cn=Users, dc=maximus,dc=com
cn=portal,cn=users,dc=maximus,dc=com
cn=portal_admin,cn=users,dc=maximus,dc=com
cn=uddi_publisher,cn=Users,dc=maximus,dc=com... (4 Replies)
Discussion started by: itzz.me
4 Replies
9. Shell Programming and Scripting
I have a text file, a sample of which is as follows:
r/- * 0: WINDOWS/Microsoft.NET/Framework/v2.0.50727/ASP.NETWebAdminFiles/Images/headerGRADIENT_Tall.gif
r/- * 0: WINDOWS/SoftwareDistribution/Download/cf8ec753e88561d2ddb53e183dc05c3e/backoff.jpg
r/- * 0: ... (2 Replies)
Discussion started by: stumpyuk
2 Replies
10. Programming
Hi, experts,
I would like to create a function that can calculate the total number of lines in a saved text file and delete specific lines in that particular file (I only want the last few lines). Hav anybody have the experience and giv me a hand in this? (9 Replies)
Discussion started by: dniz
9 Replies