| View previous topic :: View next topic |
| Author |
Message |
NewToBash
Joined: Tue Nov 29, 2005 11:24 pm Posts: 1
|
Posted: Tue Nov 29, 2005 11:30 pm Post subject: Need help with Bash scriting |
|
|
Hello,
I'm a newbie to Bash. If someone could help me out with this it will be great.
I need to write a script to be able to go through all the directories (contained in home directory) ,names starting with "ms" and for each of such directories found create a new directory inside with the name "msdir"
Also please someone suggest a good website with lots of basic Bash scripts to help me learn how to program.
Thanks |
|
| Back to top |
|
 |
RD LXF regular
Joined: Mon Jul 25, 2005 3:53 am Posts: 272 Location: irc.ixl2.net
|
Posted: Wed Nov 30, 2005 12:11 am Post subject: RE: Need help with Bash scriting |
|
|
>> Also please someone suggest a good website with lots of basic Bash scripts to help me learn how to program.
Here is the best one i ever used infact its the best one most coders have used enjoy  _________________ [url=irc://irc.ixl2.org/ixl2]irc.ixl2.org[/url] |
|
| Back to top |
|
 |
nelz Moderator

Joined: Mon Apr 04, 2005 12:52 pm Posts: 8036 Location: Warrington, UK
|
Posted: Wed Nov 30, 2005 12:40 am Post subject: RE: Need help with Bash scriting |
|
|
You don't need a bash script, just the find command
| Code: | | find ~ -type d -name 'ms*' -exec mkdir -p {}/msdir ';' |
See man find for more details. _________________ "Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein) |
|
| Back to top |
|
 |
| View previous topic :: View next topic |
|