KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

Double Quotes in Script Parameter

 
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting
View previous topic :: View next topic  
Author Message
oryagel



Joined: 28 Jul 2010
Posts: 92

PostPosted: Wed Oct 01, 2014 12:32 am    Post subject: Double Quotes in Script Parameter Reply with quote

Hi,

I'm trying to pass a parameter that includes quotes to a powershell script.
So basically the params line looks something like that:

Code:
10 20 '(abc),"7d",(def)'


I need the third parameter to be
Code:
(abc),"7d",(def)

but it seems like it's turned to
Code:
(abc),7d,(def)
without the double quotes.

What should I do?

Thanks
Back to top
View user's profile Send private message
KS-Soft Europe



Joined: 16 May 2006
Posts: 2832

PostPosted: Wed Oct 01, 2014 2:47 am    Post subject: Reply with quote

You need to use backslash( \ ) symbol before each double quote:
Code:
10 20 '(abc),\"7d\",(def)'
Back to top
View user's profile Send private message Send e-mail Visit poster's website
oryagel



Joined: 28 Jul 2010
Posts: 92

PostPosted: Wed Oct 01, 2014 2:50 am    Post subject: Reply with quote

Great! Thanks!
I should have tried it myself.
Back to top
View user's profile Send private message
KS-Soft Europe



Joined: 16 May 2006
Posts: 2832

PostPosted: Wed Oct 01, 2014 3:16 am    Post subject: Reply with quote

You are welcome!
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index