Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Re: system, pipes, shell, quoting

by superpete (Beadle)
on Nov 13, 2002 at 06:10 UTC ( [id://212496]=note: print w/replies, xml ) Need Help??


in reply to Re: system, pipes, shell, quoting
in thread system, pipes, shell, quoting

you seem to have lots of experience :-)

Do you have any specific implementation examples of how to quote arbitrary characters to the shell in a system or open ?

Replies are listed 'Best First'.
Re: Re: Re: system, pipes, shell, quoting
by dws (Chancellor) on Nov 13, 2002 at 06:22 UTC
    Do you have any specific implementation examples of how to quote arbitrary characters to the shell in a system or open ?

    I avoid situations where arbitrary characters have to be quoted. In the rare case where I have a CGI form that accepts something like a filename, I'll reject the name if it contains any funny characters. Trying to escape funny characters is a losing battle.

    I also keep my filenames simple (using only alphanumerics, underscores, dashes, and periods).

      Alas, I do not have the luxury of making up my own filenames.

      I am working on a "utility" type program executed from crontab rather than as a CGI, and my filenames come from walking a directory tree. The files might be generated by anything, and I want to cover all the bases.

      Trying to escape funny characters is a losing battle.

      Well... sort-of. Not a problem when doing straight open's, or simple system's (systen with a list of arguments avoids the shell).

      When launching a "pipeline" of several external programs, the shell provides tremendous convenience... see original post.

Re: Re: Re: system, pipes, shell, quoting
by vaevictus (Pilgrim) on Nov 13, 2002 at 20:34 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-04-18 08:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found