Saturday, December 2, 2023
rated 0 times [  1] [ 0]  / answers: 1 / hits: 607  / 2 Years ago, sun, july 18, 2021, 4:38:58

As it says on the tin really. I would like to send some of my etc files to a colleague and it would be handy to cat them to a new Thunderbird email message.

Is this possible? If so how?

More From » command-line


Give this a try, it's working fine for me:

cat /etc/[file1] /etc/[file2] /etc/[file3] > ~/configs.txt && thunderbird -compose "subject='test',attachment='~/configs.txt'"

or (a revised command which will also print each filename):

for file in /etc/[file1] /etc/[file2] ; do echo -e '
****' $file '****
' >> ~/configs.txt ; cat $file >> ~/configs.txt ; done && thunderbird -compose "subject='test',attachment='~/configs.txt'"

Just replace the [fileX] names with the ones you're interested.

The above command will create a new file named configs.txt with all of the config files you want and add it as an attachment to a new 'compose mail' window in TB.

[#44647] Monday, July 19, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.

Total Points: 112
Total Questions: 113
Total Answers: 113

Location: Guernsey
Member since Tue, Jul 6, 2021
2 Years ago