passing double backslash(\\) as a path in unix

Hi All,

I am trying to add a tag in the *.imp file.

This is a piece of code which I am giving in my template file and my script reads this template file attachment and passes to windows server(as they have provided the below file path).

@*@ATTACHMENT@*@:\\Appl051a\e\ftproot\Infoman_import\live\file.csv

in unix, When I am passing this in a template file as per the above expected code as below,

@*@ATTACHMENT@*@:"\\\\Appl051a\\e\\\\ftproot\\Infoman_import\\live\\file.csv"

here by passing extra (single \ backslash) the unix identifies a single slash,

now here is the problematic part,

Eventhough I have given,

@*@:"\\\\Appl051a extra backslashes, but it still detects as one single backslash as below in the output imp file,

@*@ATTACHMENT@*@:"\Appl051a\e\ftproot\Infoman_import\live\file.csv"

Only one single backslash is being taken.

Please can any one help me in identifying how I can resolve this by making it start with
@*@ATTACHMENT@*@:"\\Appl051a

Thanks in Advance,

use single quotes.

echo '\\\\Appl051a\\e\\\\ftproot\\Infoman_import\\live\\file.csv'

Personally I'd hold such a filename in a flat text file and avoid unix Shell interpreting the filename by using "cat" instead of "echo" or whatever is appropriate to your process.

Beware with the bckslash approach that it will behave differently from within a Shell script compared with the command line. Always test from a Shell script.

Thanks anchal_khare and methyl.

I have used while read -r textline and it has indeeed worked out.

Thanks for your prompt reply.