Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Help with shell script required

Thread Tools
 
Search this Thread
 
Old Aug 25, 2008 | 06:23 PM
  #1  
Markus's Avatar
Markus
Thread Starter
Scooby Regular
25 Year Member
 
Joined: Mar 1999
Posts: 25,080
Likes: 0
From: The Great White North
Default Help with shell script required

Afternoon/evening all,
I need a bit of help on the shell script front.

The script is going to take an argument from the command line for the item at the end of the path, which would be something like:

/Network/Servers/AServer/Volumes/AVolume/${1}

The problem comes from the fact that the "Servers/AServer/Volumes/AVolume" path(s) won't exist, so I'll need to create them. I'm going to guess some repeat loop might be the way to do this, but I'm unsure exactly how to go about this, plus there might be an easier way out there to do this.

Any suggestions greatly appreciated
Reply
Old Aug 27, 2008 | 10:49 PM
  #2  
druddle's Avatar
druddle
Scooby Regular
 
Joined: Mar 2001
Posts: 5,528
Likes: 0
From: Berkshire
Default

If you need to create the whole path then use "mkdir -p" to do that in one go instead of doing them one by one (UNIX by the way).

Dave
Reply
Old Aug 28, 2008 | 01:00 AM
  #3  
Markus's Avatar
Markus
Thread Starter
Scooby Regular
25 Year Member
 
Joined: Mar 1999
Posts: 25,080
Likes: 0
From: The Great White North
Default

Absolutely what I wanted to know, thanks Dave
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Abx
Subaru
22
Jan 9, 2016 05:42 PM
Mattybr5@MB Developments
Full Cars Breaking For Spares
28
Dec 28, 2015 11:07 PM
Mattybr5@MB Developments
Full Cars Breaking For Spares
12
Nov 18, 2015 07:03 AM
gazzawrx
Non Car Related Items For sale
13
Oct 17, 2015 06:51 PM
FuZzBoM
Wheels, Tyres & Brakes
16
Oct 4, 2015 09:49 PM




All times are GMT +1. The time now is 01:35 PM.