dickiebird
Programmer
Hi
Mental breakdown morning !
I'm trying to test for the presence of 8 files minimum
in current directory, with names of :
RTSBuybacks.0402260909
RTSCountries.0402260909
RTSLoyaltyCardPointBandHistory.0402260909
RTSLoyaltyCardScheme.0402260909
RTSLoyaltyCardTypes.0402260909
RTSSite.0402260909
RTSTransactionLines.0402260909
RTSTransactions.0402260909
This snippet fails with "Doh" - any ideas why ?
Or is there a better way to see if the 8 files exist ?
if [[ -a RTSSite* && -a RTSCountr* && -a RTSBuyb* && -a RTSLoyaltyCardT* && -a RTSLoyaltyCardP* && -a RTSLoyaltyCardS* && -a RTSTransactions* && -a RTSTransactionL* ]]
then
export DS=$(echo RTSTransactions*|cut -c17-26)
else
echo "Doh"
fi
TIA
Dickie Bird (-)))
Mental breakdown morning !
I'm trying to test for the presence of 8 files minimum
in current directory, with names of :
RTSBuybacks.0402260909
RTSCountries.0402260909
RTSLoyaltyCardPointBandHistory.0402260909
RTSLoyaltyCardScheme.0402260909
RTSLoyaltyCardTypes.0402260909
RTSSite.0402260909
RTSTransactionLines.0402260909
RTSTransactions.0402260909
This snippet fails with "Doh" - any ideas why ?
Or is there a better way to see if the 8 files exist ?
if [[ -a RTSSite* && -a RTSCountr* && -a RTSBuyb* && -a RTSLoyaltyCardT* && -a RTSLoyaltyCardP* && -a RTSLoyaltyCardS* && -a RTSTransactions* && -a RTSTransactionL* ]]
then
export DS=$(echo RTSTransactions*|cut -c17-26)
else
echo "Doh"
fi
TIA
Dickie Bird (-)))