Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: Re: system, pipes, shell, quoting

by superpete (Beadle)
on Nov 13, 2002 at 20:04 UTC ( #212674=note: print w/replies, xml ) Need Help??

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

#!/usr/bin/perl $fname = "foo\nbar"; #-- standard idiot-proof open $fname = "./$fname" if $fname =~ /^\s/; open F, "> $fname\0"; print F "testing 1 2 3\n"; close F; system("cat \Q$fname\E"); # produces error unlink $fname;

Replies are listed 'Best First'.
Re: Re: Re: system, pipes, shell, quoting
by BrowserUk (Pope) on Nov 13, 2002 at 21:00 UTC

    And do you have any way of accessing a file who's name contains an embedded newline from your shell?

    Ie. Can you type the cat command at the CLI and have it work?

    Okay you lot, get your wings on the left, halos on the right. It's one size fits all, and "No!", you can't have a different color.
    Pick up your cloud down the end and "Yes" if you get allocated a grey one they are a bit damp under foot, but someone has to get them.
    Get used to the wings fast cos its an 8 hour day...unless the Govenor calls for a cyclone or hurricane, in which case 16 hour shifts are mandatory.
    Just be grateful that you arrived just as the tornado season finished. Them buggers are real work.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2021-03-03 03:19 GMT
Find Nodes?
    Voting Booth?
    My favorite kind of desktop background is:

    Results (69 votes). Check out past polls.