system
1
Hi,
Iam new to shell program,
I want to check a file which is having same lines 2 times and i want to display it in a seperate file.
File format is :
AQWERTYU|1234567890
ASDFGHJK|0987654321
ZXCVBNML|1098576453
AQWERTYU|1234567890
I need to take the 1st and 4th lines in the above file and write it in to seperate file.
Please help me.
Thanks in advance
system
2
sorry i need to take 1st and 4th line in the above file.
Try this one
for i in `uniq -d filename`
do
grep $i b
done > result.temp
system
4
Here what is b in the given sample code ...Pls help me??
# sort file | uniq -D
AQWERTYU|1234567890
AQWERTYU|1234567890
system
6
Thanks a lot.. .it is working fine.