Re: Get the parameter pattern from command line
am 30.03.2008 08:15:50 von mop2An idea, not very elegant, but it works.
The alias line must be inserted in /etc/profile or ~/.profile
I think this solution, with alias and function concepts, is ok for
bash and ksh93.
$ cat viewfile.ksh
#!/bin/ksh
echo "Filter: $*"
ls $*
$ alias viewfile='v(){ viewfile.ksh $*;set +f;};set -f;v'
$ viewfile e*.txt
Filter: e*.txt
energy.txt english.txt
Another solution can be the removal of the first line of viewfile.ksh.
In this way, the current interactive shell will be used, I think, but
the script has to be adapted to work properly with any of
the two shells.