Basic "scripting" (batch file?) question

Joe Buczek yellowdog-general@lists.terrasoftsolutions.com
Wed May 22 11:42:01 2002


You want 'mktemp -d foo.XXXXXX'.  See 'man mktemp' for examples. I
found this by typing 'apropos unique'. You might want to remember
the apropos command for future use. :-)

As for chmod, you should read 'man chmod' for details.

Cheers,
--Joe

--- "Eric D." <liriodendron@mac.com> wrote:
> Hello, I'm trying to delve a little deeper into the workings of
> Linux. Now I
> have two "scripting" questions (more like batch files).
> 
> I'm trying to write a batch file that:
> 
> (a) creates a folder with a "unique" name (generated by the batch
> file --
> e.g. date+time or random numbers, etc.)
> 
> and then
> 
> (b) moves files from one (permanent) directory to this (less
> permanent)
> directory.
> 
> I used to be able to write simple "batch" files in mach Unix
> aeons (94) ago
> and make them executable (chmod -x?) but haven't been able to
> figure it out
> here (plus, I'd like to remap ls to my execute my own preferred
> -a and -L).
> 
> First of all: 
> (1) how would I generate a unique name (e.g. date+time)
> (2) how would I get that name (uniquename) to be used in the
> "mkdir
> uniquename" and "mv /Permanent/* /uniquename/" commands
> (3) how would I make that file "executable" (I thought it was
> chmod -x or -X
> but that doesn't seem to work).
> 
> I presume I have to use a string but I don't know how (my
> programming
> experience has been with BASIC & Pascal, and my scripting limited
> to
> recording (and basic editing) of AppleScripts).
> 
> So far I have in my "etest" "pico"ed (my favourite *nix editor :)
> file:
> mkdir uniquename
> mv Permanent/* uniquename/
> 
> So... as you can see I'm lacking the code to create the
> uniquename & I don't
> know how to make it "executable" :( :(
> 
> Thanks for your help in advance, Eric.
> 
> _______________________________________________
> yellowdog-general mailing list
> yellowdog-general@lists.terrasoftsolutions.com
>
http://lists.terrasoftsolutions.com/mailman/listinfo/yellowdog-general


__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com