The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
removing old files except configuration files and folders jamcalicut Shell Programming and Scripting 1 11-09-2007 04:34 PM
Removing files LiquidChild UNIX for Advanced & Expert Users 2 06-22-2007 10:39 AM
removing files luft UNIX for Dummies Questions & Answers 8 03-21-2007 12:53 PM
Removing Files Dastard SUN Solaris 1 03-13-2007 09:13 PM
Removing Files Blondie UNIX for Dummies Questions & Answers 5 07-17-2001 07:30 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 01-28-2008
jazz8146 jazz8146 is offline
Registered User
  
 

Join Date: Nov 2007
Posts: 20
Removing Files

Hi,
This might seem like a really stupid question but i have created a shell script and at the end of the script i want to remove most of the file i create. So I have:

rm file[1-4] test[1-9] sorted[1-12]

However this does not work for the sorted one. The only way i can get this to work is if i do:

rm sorted[1-9] sorted[1][0-2]

Is this correct??

Thanks
Jason
  #2 (permalink)  
Old 01-28-2008
ennstate ennstate is offline
Registered User
  
 

Join Date: Mar 2007
Location: Chennai
Posts: 222
Pls tell us the pattern of the file?

Thanks
Nagarajan G
  #3 (permalink)  
Old 01-28-2008
jazz8146 jazz8146 is offline
Registered User
  
 

Join Date: Nov 2007
Posts: 20
sorted1 sorted2 sorted3 sorted4 etc up to sorted14
  #4 (permalink)  
Old 01-29-2008
Yogesh Sawant's Avatar
Yogesh Sawant Yogesh Sawant is offline Forum Staff  
Part Time Moderator and Full Time Dad
  
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 1,086
rm sorted[1-9] sorted1[0-4]
  #5 (permalink)  
Old 01-29-2008
earnstaf earnstaf is offline
Registered User
  
 

Join Date: May 2007
Posts: 113
Quote:
Originally Posted by jazz8146 View Post
sorted1 sorted2 sorted3 sorted4 etc up to sorted14

Code:
rm sorted[0-9]*

Closed Thread

Bookmarks

Tags
regex

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 07:22 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