Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

Shell scripts

Hi,

Is there any special rules for writing shell scripts in µClinux ?

I wrote that script:

# #####################

# !/bin/sh

/bin/touch /tmp/log

/bin/date >> /tmp/log

# #####################

But all I got is the empty log file.

And when I execute the command /bin/date >> /tmp/log I can see the

result in the log file !!!!!

Warm Regards

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    <div class='quotetop'>QUOTE </div>

    --- Quote Start ---

    But all I got is the empty log file.

    And when I execute the command /bin/date >> /tmp/log I can see the

    result in the log file !!!!![/b]

    --- Quote End ---

    Hi,

    I figured out the following:

    when I changed that >> to a simple > the script works fine.

    So, now I&#39;m in real trouble cause I got to save a lot of informations in the same file.

    Briefly, I got to implement those commands:

    date >> log

    ps >> log

    echo "" >> log

    without using the >> operator !!!!!!!!!!!!

    Could anybody help me with that !

    Warm Regards