Hi All,
I have a bash script that we are using to clean up permanently suspended accounts.
One of the functions is searching for all of the files in the users home directory and then marking them to be deleted.
I am using the following command to gather the information and send the output to two separate files. The overall log file (main_log_file) keeps track of specific key points within the overall script. The user file (user_log_file) logs everything gathered for each specific user.
$gam redirect csv "${home_dir}/${user}.csv" user "${user}" print filelist showownedby me fields id,name 2>&1 | tee -a "${user_log_file}" "${main_log_file}"
I was originally using the following before I had to start logging the main log also.
$gam redirect stdout "${log_file}" append redirect stderr stdout multiprocess redirect csv "${home_dir}/${user}.csv" user "${user}" print filelist showownedby me fields id,name
I am wondering if there is a way to use gam's redirect commands to send to two files?
I did try the following but it gave me a error as expected.
$gam redirect stdout
"${user_log_file}" "${main_log_file}" append redirect stderr stdout multiprocess redirect csv "${home_dir}/${user}.csv" user "${user}" print filelist showownedby me fields id,name
Thank you.
Ray