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

Re: Returning from a program

by graff (Chancellor)
on Aug 12, 2002 at 21:28 UTC ( #189641=note: print w/replies, xml ) Need Help??

in reply to Returning from a program

If kshell supports the same kind of shell variable assignments that are typical in (ba)sh, then something like this ought to work:

The perl script simply prints the name of the selected file to stdout, terminated by a line-feed.

The perl script is invoked from kshell using backticks, in a construct like the following:

ENV_FILE=`selection_script.perl` setup_env ENV_FILE

Unlike the perl backtick operator, the use of backticks in (ba)sh returns the output of the command with all line-feeds converted to spaces.

update: revised the shell script to reflect the example given by peschkaj.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2022-05-25 14:07 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (90 votes). Check out past polls.