Overview
Artifact ID: | 8a1342deb7db61f3976a3b0fd652c6595ac364d6 |
---|---|
Ticket: | 7a6a0da88636147ba40cc76010bdda68e6d59684
Not picking up variable values when running remote bash script with for loop |
User & Date: | anonymous 2020-04-08 11:53:25 |
Changes
- icomment:
my expect script copies a bash script onto a remote server it the exectues thisscript on the remote server i define a variable within the script i.e. WDIR="/data01/ftp" my for loop in the script only works if i use the directory name and not the variable DOESNT WORK:- for H in `cd $WDIR ; ls ${SITE}*log*gz | awk -F_ '{print $1}' |sort|uniq` do WORKS:- for H in `cd /data01/ftp ; ls ${SITE}*log*gz | awk -F_ '{print $1}' |sort|uniq` do
- login: "anonymous"
- mimetype: "text/plain"
- private_contact changed to: "9cb6bfaf8f775898d0132da693a27c2ed81b020a"
- severity changed to: "Important"
- status changed to: "Open"
- title changed to:
Not picking up variable values when running remote bash script with for loop
- type changed to: "Incident"