Bash to Perl/C

From: John (johns_at_hotmail.com)
Date: 12/26/04


Date: Sun, 26 Dec 2004 01:42:04 GMT

Hi,

I need to write a really quick perl AND/OR c program that does what this
bash loop below:

----------------------------------------------------
while true
do
Q=A ; echo $Q > /tmp/A
Q=B ; echo $Q > /tmp/B
done
----------------------------------------------------

Also, it would be great if this program in addition to writing value of
variable to /tmp file, assigned value of this variable to shell variable so
it was visible to the shell that started this app.

Thanks



Relevant Pages

  • Apache conf file parser
    ... perl, but I am writing my app, in python and don't want to call perl ...
    (comp.lang.python)
  • Annoying Problem with a Basic Perl app and XP Pro
    ... New to perl, ... I wanted a simple and efficeint app ... sub main_transfer { ... I've looked through the lists, but this issue hasn't shown up... ...
    (comp.lang.perl.misc)
  • Re: Reading Output from Shell Command
    ... I don't know anything about Perl. ... string comes from the output, say about in 1/2 hour, then you might have to ... > my main app, let me tell you a bit about what the app does, and see if you ... > think switching to a redirect and streamreader is the way to go. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Some Advice.
    ... Practice, practice. ... really need that much math to learn to program. ... > for an algorithm but writing a program is more like writing a good paper ... No comment, I don't know Perl. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Newbie Question...
    ... them for writing, they are automatically clobbered. ... > complains that it cannot close the first outputfile ... > of Perl, but what am I doing wrong with the script??? ... Can you do a recursive directory search in perl without ...
    (comp.lang.perl.misc)