Solved

script to write file output file with double quotes

Posted on 2008-10-09
6
350 Views
Last Modified: 2013-12-26
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...
0
Comment
Question by:jools
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 45

Accepted Solution

by:
sunnycoder earned 500 total points
ID: 22679001
echo "alicreate \"MYALIAS\",\"00:00:00:00:00:00:00:00\""
0
 
LVL 19

Author Comment

by:jools
ID: 22679066
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.

0
 
LVL 19

Author Comment

by:jools
ID: 22679094
I've just typed it in verbatim and it works...

(ever had one of those days???)
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 45

Expert Comment

by:sunnycoder
ID: 22679167
:) .. I have had my fair share
0
 
LVL 19

Author Comment

by:jools
ID: 22679173
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...
0
 
LVL 19

Author Closing Comment

by:jools
ID: 31504671
thanks, I thought I was really loosing it....

0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Convert grep lines to perl 6 79
what do I need to host my own web sites? 13 67
Understanding ping command in Ubuntu 5 33
regular expression help for sed command 5 41
Utilizing an array to gracefully append to a list of EmailAddresses
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question