Tag Info

New answers tagged


With zsh: mutt -s "Log" -a /path/to/*.log(.om[1]) example@example.com That uses zsh glob qualifiers. While other shell globs can only generate filenames based on their name, in zsh, you can use those qualifiers ((.om[1]) above), to select based on file attributes (type, size, times, permissions...) or other criteria of your own, affect the order, apply ...


Get_Attachment_Name () { file_attachment_dir="Whatever you want your directory to be" file_attachment=`ls -lrt -- "$file_attachment_dir" | grep -v "^[bcdl]"| tail -n 1 | awk '{print $9}'` } Grepping out any output lines starting with b, c, d, or l will eliminate trying to send block special files, character special files, directories or symbolic ...

Top 50 recent answers are included