Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Any tips on passing bash variables as arguments to a perl script (that contain spaces and/or non-ascii characters)

by wrog (Friar)
on Apr 17, 2015 at 05:27 UTC ( [id://1123689]=note: print w/replies, xml ) Need Help??


in reply to Re: Any tips on passing bash variables as arguments to a perl script (that contain spaces and/or non-ascii characters)
in thread Any tips on passing bash variables as arguments to a perl script (that contain spaces and/or non-ascii characters)

since the question is about about Linux and bash, you can probably skip the page about quoting on non-Unix systems; the bash manual is what you want. Most of the time, putting the arguments in double quotes does what you want, e.g.,
scriptname ... "${OPC_MSG_TXT}"
will ensure that whatever $OPC_MST_TXT expands to ends up as a single positional parameter
  • Comment on Re^2: Any tips on passing bash variables as arguments to a perl script (that contain spaces and/or non-ascii characters)
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1123689]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2024-04-25 07:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found