10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Team,
I am writing a shell script to perform few health checks of the system, where I need to delete the previous line in the text file after pattern match using sed (or) awk.
Could you please help me out on this?
For example,
<td>
<td style=color:green align=center>
</td>
</tr>... (6 Replies)
Discussion started by: Nagaraj R
6 Replies
2. Shell Programming and Scripting
file:
1|12322|tow|
5|23422|pow|
6|23423|cow|
3|34324|how|
deletelines:
12322
23423
My command to delete line
while read NUM
do
awk -F"\|" '$2 !~ /`"$NUM"`/' file >file.back
mv file.back file
done<deletelines (3 Replies)
Discussion started by: Roozo
3 Replies
3. Shell Programming and Scripting
Dear Shell experts,
I have 2 files with structure:
File 1: ID and count
head test_GI_count1.txt
1000094 2
10039307 1
10039641 1
10047177 11
10047359 1
1008555 2
10120302 1
10120672 13
10121776 1
10121865 32
And 2nd file:
head Protein_gi_GeneID_symbol.txt
protein_gi GeneID... (11 Replies)
Discussion started by: smitra
11 Replies
4. UNIX for Dummies Questions & Answers
Here is my file:
700 7912345678910
61234567891234567891
700 8012345678910
61234567891234567891
I want to pull all lines that begin with '700' only if columns 11-12 are '79'.
My code so far only pulls the '79', not the whole line:
grep ^700 file1 | cut -c 11,12 |... (7 Replies)
Discussion started by: Scottie1954
7 Replies
5. UNIX for Advanced & Expert Users
Hello All,
I have following line and text file
line =08 * * 3 /data/reports/bin/xyz.ksh -o customreports.com -f abc.sql -m xyz.com -c -g
file:- abc.crontab
08 * * 3 /data/reports/bin/xyz.ksh -o customreports.com -f abc.sql -m xyz.com -c -g
06 * * 3 /data/reports/bin/xyz.ksh -o... (3 Replies)
Discussion started by: anyera
3 Replies
6. Shell Programming and Scripting
Hi,
How to delete the last line if is match the below string else no action...
String checking "END OF FILE. ROW COUNT: "
9f680174-cb87-4f71-887a-93b6f62fa5aa|20077337254|2
9f680174-cb87-4f71-887a-93b6f62fa5aa|20077337254|0
229f680174-cb87-4f71-887a-93b6f62fa5aa|20077337254|3
END OF... (2 Replies)
Discussion started by: bmk
2 Replies
7. Shell Programming and Scripting
Hi folks,
I've list of LDAP records in this format:
cat cmmac.export.tmp2
dn: deviceId=0a92746a54tbmd34b05758900131136a506,ou=devices,ou=customer,ou=nl,o=upc
cmmac: 00:13:11:36:a5:06
dn: deviceId=0a92746a62pbms4662299650015961cfa23,ou=devices,ou=customer,ou=nl,o=upc
cmmac:... (4 Replies)
Discussion started by: tomas.polak
4 Replies
8. Shell Programming and Scripting
Hi All,
I need some help in writing a small script using Awk.
My input file has following deatils
A,B,C,D
8239359,8239359,8388125,8388125
8239359,8239359,8388125,8388125
7165981,7165981,8363138,8363138
8283830,8283830,8382987,8382987
8209964,8209964,8367098,8367098 ... (8 Replies)
Discussion started by: pistachio
8 Replies
9. Shell Programming and Scripting
hi,
i am parsing a file, in that searching for lines those contains "$threadNo.Received message:" , if that line contains the required fields write them into a separate file other wise ignore them.
i am using the following code,but it is printing all the lines , i dont want to rpint , please help... (3 Replies)
Discussion started by: Satyak
3 Replies
10. Shell Programming and Scripting
I am searching a dhcpd.conf to find the hardware ethernet match, then once the match is found delete just the line above it. For example:
testmachine.example {
hardware ethernet 00:00:00:00:00:00;
fixed address 192.168.1.100;
next-server 192.168.1.101;
filename "linux-install/pxelinux.0";
}... (3 Replies)
Discussion started by: cstovall
3 Replies