I want to pass multiple filenames (7 to 10) to a shell script from java code.The filenames are fetched from Database depending on conditions, so the number of files is not fixed. The max will be 10 file names.
In the shell script i want to copy all these files to a different directory.
What i am doing is
cp -p “$@” /dir/temp/
But this dosent seem to work.
I am a newbie in unix and shell scripting.
Thanks.
You can use a loop where the contents of $@ is copied one by one