The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
find and delete reccuring entries in a file greekozz UNIX for Dummies Questions & Answers 3 06-18-2007 12:32 PM
Need to delete multiple lines in a file. kangdom Shell Programming and Scripting 6 10-16-2006 12:02 PM
Filtering multiple entries in a file suman_jakkula Shell Programming and Scripting 2 08-22-2006 06:02 AM
Script to delete all data from multiple files uni_ajay_r Shell Programming and Scripting 5 03-29-2006 12:05 PM
Need a script to delete multiple files navycow UNIX for Dummies Questions & Answers 3 01-16-2006 02:50 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-14-2008
sidewayz sidewayz is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 2
Need Script to delete multiple entries from a file

I am new to Linux and would appreciate some help. I need a script to do the following:

My file contains the following entries

more file
1
1
1
1
2
2
2

I want to delete multiple entries of 1 and 2 and just keep one of each. The output should look like

more file
1
2

Thanks
  #2 (permalink)  
Old 02-14-2008
sidewayz sidewayz is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 2
Got it!!! Used the uniq command to do the trick...

Thanks
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:07 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0