Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- FA_log_locations=`echo $1| sed 's/,/" "/g; s/$/")/g; s/^/("/g'`
- echo $FA_log_locations
- for jj in FA
- do
- PASSWORD=$FA_PASSWORD
- USER=$FA_USER
- eval number_of_dirs=${#${jj}_log_locations[@]}
- for ii in `seq 0 $((number_of_dirs-1))`
- do
- eval new_dirname=${jj}_type_${ii}
- eval source_details=${HOST_$jj}
- eval source_loc=${${jj}_log_locations[$ii]}
- export ${jj}_type_${ii}="${source_loc}"
- echo $ii
- done
- done
- # bash -x /tmp/test.sh /u01,/u02
- ++ echo /u01,/u02
- ++ sed 's/,/" "/g; s/$/")/g; s/^/("/g'
- + FA_log_locations='("/u01" "/u02")'
- + echo '("/u01"' '"/u02")'
- ("/u01" "/u02")
- + for jj in FA
- + PASSWORD=
- + USER=
- + eval 'number_of_dirs=${#FA_log_locations[@]}'
- ++ number_of_dirs=1
- ++ seq 0 0
- + for ii in '`seq 0 $((number_of_dirs-1))`'
- + eval new_dirname=FA_type_0
- ++ new_dirname=FA_type_0
- + eval 'source_details=${HOST_FA}'
- ++ source_details=
- + eval 'source_loc=${FA_log_locations[$ii]}'
- ++ source_loc='("/u01" "/u02")'
- + export 'FA_type_0=("/u01" "/u02")'
- + FA_type_0='("/u01" "/u02")'
- + echo 0
- 0
Add Comment
Please, Sign In to add comment