Linux scripting
I want to make a script, that makes directory's en copy's files, when I execute it!!
My Linux distribution is Debian!! Does anyone know how to set up a script like that?? (with "nano" or so" Thanks Cybercool |
Yes!!
It's something like this!! #!/bin/sh mkdir -p /path/to/new/directory cp /name/of/file /new/destination/of/file Isn't that easy?? Now, if you'd like more specific help, please explain a little more about what you mean by "makes directory's en copy's files". |
And how do I run the script???
Does it need a special program?? Cybercool |
in terminal type sh yourscript or ./yourscript
but first cd into the dir of the script. |
You also have to type
chmod u+x <scriptname> to make the script an executable file. You can most probably do this in your file browser window (in Suse konquerer: right-click on file, Properties menu option, permissions tab, click the user exec tickbox to put an X in there). For anything else to do with scripting, start by typing 'bash tutorial' into google. |
to make things simpler, put your script in /usr/local/bin, and then you can run it as a command
|
All times are GMT -5. The time now is 07:03 PM. |