Basic *nix scripting question...

Entity

Lifer
Oct 11, 1999
10,090
0
0
I want to write a script called "copytheme" that does this for me...

cp -r $DIRECTORYNAME ../website/themes/

It should be simple, but I can't really figure it out. I've written scripts before but never dependent on variables entered from the commandline...

Anyone wanna lend me a hand? It should only be a line or two. :p

thanks
Rob
 

dabuddha

Lifer
Apr 10, 2000
19,579
17
81
if by directory name you mean the current directory, you'd use PWD which is the present working directory
if you wanted to specify the directory via command line, you'd use $1