Scunningham99
Programmer
Hi
We have an application wherby the user types in the name of a file. We need to capture this name in text so we can use it for another part of the applciation which ftp's the file. for example:-
user types : ups
So we would need to capture ups and append .csv
So ups.csv would be used later in the program.
Our application passes a string of variables to unix via $1.
The field we need is the eigth one, so we cut this out as follows:-
USER_PARAMS="`echo $1|cut -f8 -d=`"
#echo $USER_PARAMS
FILE_NAME="`echo $USER_PARAMS|cut -c4-4`" <<--
This is the bit im struggling on for ideas as the user could type in ups, parcelforce etc so how can i make this bit dynamic?
Sy UK
We have an application wherby the user types in the name of a file. We need to capture this name in text so we can use it for another part of the applciation which ftp's the file. for example:-
user types : ups
So we would need to capture ups and append .csv
So ups.csv would be used later in the program.
Our application passes a string of variables to unix via $1.
The field we need is the eigth one, so we cut this out as follows:-
USER_PARAMS="`echo $1|cut -f8 -d=`"
#echo $USER_PARAMS
FILE_NAME="`echo $USER_PARAMS|cut -c4-4`" <<--
This is the bit im struggling on for ideas as the user could type in ups, parcelforce etc so how can i make this bit dynamic?
Sy UK