Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Help with ksh Script not resolving '@' in ls command

$
0
0
Hi all,
We've been trying to find a way to get a command to work within a ksh with no success.
We are attempting to list various files with different hlq's like this
Code:

ls $FileDir/dir/subdir/${triggers}
The $FileDir is set in the script.
The $triggers resolves to
Code:

triggers=sys.file@(.test|.uat|.live|).[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].tg
The command works fine from the command line (It returns the list of files) but within the script is says
Code:

sys.file@(.test|.uat|.live|).[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].tg not found.
We suspect the problem is the coding of '@' within the shell as it looks like it is taking the @(.test|.uat|.live|) as a literal name rather than expand it into the three different qualifiers.

Any help much appreciated

Cheers

Viewing all articles
Browse latest Browse all 16232

Trending Articles