display "*"

Hi,

I've a problem with display "*" character:
I'd like to use a script which take a complete path of set of files or directories in argument and separate them into their "dirname" part and their "basename" part.

It works nearly exept that if i want to display the result (dirname + basename), i have problem while displaying the value of the basename part:
for example with arg="/app/share/" and argbase=$(basename $arg)
echo $argbase will display all the file and directories instead of "
"

At command prompt, i've no problems but only when using kshell scripts ...

Thanks for your help.

:confused:

Not sure, but you could try ...

arg=/app/share/\*
Without quotes.

It could work but i'd like to keep the meaning of "".
Furthermore, "arg=/app/share/
" is just an example, i have develop a generic menu which should call above a set of scripts using this type of arguments.

I am probably way off, but are you trying to give the menu the ability to run any script/program in a given directory?

For example, if you have 1.sh and 2.sh in /usr/share, and 3.sh and 4.sh in /opt/share, and your menu's current working directory is /opt/share, you'd have a list of the available scripts to run?

Please let me know, because there may be a simple way of doing this via the "select" shell builtin (if you're using a shell that supports it).

I don't think that the menu is in question for the moment. In fact and for informations, the script menu reads a list of scripts according to specific arguments.

Actualy, i'm trying different syntax of echo command like (echo , echo "") but in certain case(?), that does not work in shell scripts.

I've found a simple solution to my problem.
It's just syntactic:
My solution is based on behavior of echo command like describe above and the maner of passing parameters (with quotes !).