UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 22nd, 2004, 07:30 AM
gaming_mouse gaming_mouse is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 16 gaming_mouse User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 47 m 20 sec
Reputation Power: 0
Question Help with simple loop screens

I have a bunch of files that begin with "man", which is then followed by numbers and possibly underscores. I need to make copies of all the files that begin with "woman" instead.

I know this can be done with a simple for loop, but I can't get it working.

Thanks for any help,
gm

Reply With Quote
  #2  
Old December 22nd, 2004, 07:44 AM
guggach guggach is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2004
Location: Middle Europa
Posts: 1,098 guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 5 Days 8 h 44 m 33 sec
Reputation Power: 9
#!/bin/sh
for file in `ls man*`
do
[ -f wo$file ] && echo wo$file exists && continue
cp $file wo$file
done

Reply With Quote
  #3  
Old December 22nd, 2004, 03:25 PM
gaming_mouse gaming_mouse is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 16 gaming_mouse User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 47 m 20 sec
Reputation Power: 0
Thanks very much.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > Help with simple loop screens


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT