Hi,
I created a script to clear previous post on a specific date. In my case (01/01/2015)
I founf the following problem is that when collected by variant the name of the folder, does not recognize what's after the spaces.
zmmailbox search -m $USER -z -l 1000 "in:$FOLDER (before: 01/01/2015)" | grep conv | sed -e "s / ^ s s * //" | sed -e "s / s s * / / g" | cut -d "" -f2`
This command fails because it says it does not recognize the folder "/ emailed"
Really the folder called "/ Emailed Contacts"
If you show the value of $ FOLDER with unn miss the result is "/Emailed Contacts". So the variant isn´t a problem but I Think the "zmmailbox" that puts a carriage return when he sees a space command.
If I put:
zmmailbox search -m $USER -z -l 1000 "in:/Emailed Contacts (before: 01/01/2015)" | grep conv | sed -e "s / ^ s s * //" | sed -e "s / s s * / / g" | cut -d "" -f2`
It´s working fine!!
But I need do it by script because the users have a lot of folders...
Please, someone who can help me. I need a respuesa ASAP.
Thank you very much in advance!!
Problem zmmailbox folder with spaces in the bash script
Problem zmmailbox folder with spaces in the bash script
I'm sorry, this is the command that works for me
zmmailbox -z -m $USUARIO search -l 1000 'in:"/Emailed Contacts" (before:10/10/2016)'
But
zmmailbox -z -m $USUARIO search -l 1000 'in:"$FOLDER" (before:10/10/2016)'
Not found!! Detect /Emailed, And this folder does not exist
In the script I do a echo $FOLDER and show correctly "/Emailed Contacts"
Please, someone who can help me!! Thanks!!
zmmailbox -z -m $USUARIO search -l 1000 'in:"/Emailed Contacts" (before:10/10/2016)'
But
zmmailbox -z -m $USUARIO search -l 1000 'in:"$FOLDER" (before:10/10/2016)'
Not found!! Detect /Emailed, And this folder does not exist
In the script I do a echo $FOLDER and show correctly "/Emailed Contacts"
Please, someone who can help me!! Thanks!!