PDA

View Full Version : linux shell script


arp -d *
04-11-2004, 03:49 PM
i have a shell script i wrote where I type something like:

./npage titlehere > pagename.html

and it makes a html page with the correct title and filename that I told it.

I added at the end so that it does

mv *.html /home/username/web/


how can I change it so it only moves the file I just created and not all html files in that directory?

Zlash
04-11-2004, 04:11 PM
Well don't do *.html? do the filename.html?

Snugglebear
04-11-2004, 04:17 PM
Rather than redirect the script output to a file from the CLI, read arguments from the CLI, create your file inside the script with the specified name, and then move it to the destination. Right now your script is completely unaware that a file is even being created.