Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2005
    Posts
    116

    Unanswered: Help in Validating UNIX Commands

    Hi Guys,

    Im currently running unix aix using korn shell script.

    Actually im in the process of studying some unix commands, just need your help to validate these commands, i have google i though, just need confirmation

    while [ $var -lt 1 ]
    Checks variable if it is less than 1 ?

    if [ $var -ge 6 ]
    Checks if its greater than 6 ?

    if [ -e $1 ]
    If the files specified in $1 Exists ?

    if [ log1.log -nt log2.log ]
    Checks if log1 modified date is less than log2 modified date?

    script.sh >> script.log 2>&1
    Appends output of script.sh to script.log and redirect standard error messages to the path specified in first parameter ?

    The thing is that its easy to find commands reference in unix, commands like rm, ps -ef, grep, sed can be easily google, but certain certain commands like
    -e or -nt , its quite difficult to find what it actually does, Im not sure if this is commands or just some attributes/flags. Its quite difficult to find reference on this type of attributes/flags

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    When in doubt, write and test a short script to confirm your understanding.

    -PatP

  3. #3
    Join Date
    Feb 2005
    Posts
    116
    thanks pat, i was browsing through one of the forums and found the link below, it contains some of the most frequently used file attributes and arithmetic operators

    > http://www.metalshell.com/view/source/70/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •