Linux.com

Coyote1967

Coyote1967

  • Linux.com Member
  • Posts: 1
  • Member Since: 21 May 09
  • Last Logged In: 23 May 09

Latest Posts

Posted by
Topic
Post Preview
Posted
  • Coyote1967
    Deciphering lines of code
    Hey everyone I don't know if this is the right place to ask this question but I am trying to learn what different lines of code do and I need some help. I am looking at the Save command specifically. It was written to save files and back then up to a directory for later backup usage. The problem that I am having is in the first part of the code. For instance on this line if [! -d $1];then echo $1 is not a directory; exit 1; fi I know the fi means that the line is finished and the echo is a command to run the $1 file but what is the first part? Any help will be appreciated. Thanks
    Link to this post 21 May 09

    Hey everyone I don't know if this is the right place to ask this question but I am trying to learn what different lines of code do and I need some help. I am looking at the Save command specifically. It was written to save files and back then up to a directory for later backup usage. The problem that I am having is in the first part of the code. For instance on this line

    if [! -d $1];then echo $1 is not a directory; exit 1; fi

    I know the fi means that the line is finished and the echo is a command to run the $1 file but what is the first part? Any help will be appreciated. Thanks

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board