hello,
is it feasible to pass "*" as the parameter into script?
here is my example where * delivers file names from current directory:
is it feasible to pass "*" as the parameter into script?
here is my example where * delivers file names from current directory:
Code:
$ ls
dir1 file1 file2 test
$ cat test
#!/bin/bash
echo $@
set $(echo $@)
echo 1:"$1" 2:"$2" 3:"$3" 4:"$4" 5:"$5"
$ ./test 1 2 3 4 5
1 2 3 4 5
1:1 2:2 3:3 4:4 5:5
$ ./test 1 2 * 4 5
1 2 dir1 file1 file2 test 4 5
1:1 2:2 3:dir1 4:file1 5:file2
$