![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| shell programming | nivas | Shell Programming and Scripting | 8 | 02-11-2008 09:06 AM |
| Aix Shell Programming | akmtcs | AIX | 1 | 12-07-2006 05:40 AM |
| shell programming | Neha Agarwal | Shell Programming and Scripting | 2 | 09-06-2005 11:23 PM |
| Shell Programming Help | mec585858 | UNIX for Dummies Questions & Answers | 4 | 12-10-2003 07:24 AM |
| Shell Programming | JWK1 | UNIX for Dummies Questions & Answers | 2 | 06-01-2001 10:31 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Shell programming
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 |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
sorry i need to take 1st and 4th line in the above file.
|
|
#3
|
|||
|
|||
|
hi!!!
Try this one
Code:
for i in `uniq -d filename` do grep $i b done > result.temp |
|
#4
|
|||
|
|||
|
Shell programming
Here what is b in the given sample code ...Pls help me??
|
|
#5
|
|||
|
|||
|
Code:
# sort file | uniq -D AQWERTYU|1234567890 AQWERTYU|1234567890 |
|
#6
|
|||
|
|||
|
Shell programming
Thanks a lot.. .it is working fine.
|
|||
| Google The UNIX and Linux Forums |