You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!

Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.

Having a problem logging in? Please visit this page to clear all LQ-related cookies.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

First, Is the mail command you are executing a shell script that you wrote? I don't see that -a is a supported command line argument for the mail command.

Second, my interpretion of your error is the space between the test.txt and test.try is giving you problems, not the slash.

With the above in mind, if you are wanting a shell script to treat the value of an argument separated with spaces as a single argument, then enclose the value of the argument in either double-quotes (expansion) or single-quotes (no expansion). Example:

If your goal is to escape the meaning of a shell metacharacter or control character, then prefix that character with a whack \. BTW: I don't see that slash / is a shell metacharacter. But using your example:

DESCRIPTION
Nail is an intelligent mail processing system, which has a
command syntax reminiscent of ed(1) with lines replaced by
messages. It is based on Berkeley Mail 8.1, is intended
to provide the functionality of the POSIX.2 mailx command,
and offers extensions for MIME messages, POP3 and SMTP.