Link to home
Start Free TrialLog in
Avatar of Julian Parker
Julian ParkerFlag for United Kingdom of Great Britain and Northern Ireland

asked on

script to write file output file with double quotes

OK, I'm having a bit of a problem concentrating on work today... Holiday in 2 days!!! :-)

I need to write a script that produces this output;

     alicreate "MYALIAS","00:00:00:00:00:00:00:00"

The script is done apart from actually producing the output in the correct format... or... as is more commonly known... all done except for the important bit!

The problem is with the flippin double quotes! I've dont this before a long time ago but cant find an example of it and cant seem to google the right response.

I need a response quickly so I've given it top points.

BTW, I've tried various combinations of single and double quotes, escaping chars etc but my brain has now shut down...
ASKER CERTIFIED SOLUTION
Avatar of sunnycoder
sunnycoder
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Julian Parker

ASKER

ok, rather strangely, I get this;
   "licreate "SUN027_A","20:00:00:e0:8b:80:f9:5b

which kinda reminds me of one of my previous attempts.

I wonder if there is some sort of dodgy char in there somewhere.

I've just typed it in verbatim and it works...

(ever had one of those days???)
:) .. I have had my fair share
OK... Well I've finished the script and it looks like there was garbage on the input file.

$ cat -etv SWITCH-ALIASES.txt
alicreate "SUN008_A","20:00:00:e0:8b:82:36:8e"$
alicreate "SUN027_A","20:00:00:e0:8b:80:f9:5b^M"$

Thanks for the sanity check Sunny...
thanks, I thought I was really loosing it....