Example using uuencode:
uuencode surfing.jpeg surfing.jpeg | mail [email protected]
and reference article:
http://www.shelldorado.com/articles/mailattachments.html
Note:
you may apt install sharutils
to have uuencode
command
More Related Contents:
- When should I wrap quotes around a shell variable?
- How to pass command output as multiple arguments to another command
- What’s the magic of “-” (a dash) in command-line parameters?
- Environment variable substitution in sed
- What does “&” at the end of a linux command mean?
- What does $@ mean in a shell script?
- Better way to rename files based on multiple patterns
- Forcing bash to expand variables in a string loaded from a file
- Linux: copy and create destination dir if it does not exist
- How do I use the lines of a file as arguments of a command?
- What is the difference between “#!/usr/bin/env bash” and “#!/usr/bin/bash”?
- How to sort a file in-place?
- How to run a shell script on a Unix console or Mac terminal?
- Using the passwd command from within a shell script
- Is it OK to use the same input file as output of a piped command?
- GROUP BY/SUM from shell
- Finding contents of one file in another file
- What is the difference between “source script.sh” and “./script.sh”?
- When to wrap quotes around a shell variable?
- How do you normalize a file path in Bash?
- How to print third column to last column?
- Linux/Unix command to determine if process is running?
- How can I copy the output of a command directly into my clipboard?
- Running shell script in parallel
- Difference between shell and environment variables
- What’s the point of eval/bash -c as opposed to just evaluating a variable?
- Syntax error near unexpected token ‘then’
- Why doesn’t “sort file1 > file1” work?
- Need to remove the count from the output when using “uniq -c” command
- How do you run a script on login in *nix?