Home Learn Linux Linux Answers Systems Management Reading script lines in a script file
  • Accepted Answer

    Are you sure it's a curly brace '{', and not a square bracket '['? The square bracket is just an alternative (and quite common) syntax for invoking the command test (1). According to the man page, '-x' checks if a file is executable, '-a' means 'and', '-e' checks if a file exists.

    So in other words, if the command was actually something like

    if [ -x /usr/bin/find -a -e /lib/modules/$RELEASE/modules.dep ]

    then it would be equivalent to the pseudocode
    if ( ( /usr/bin/find is executable) and ( /lib/modules/$RELEASE/modules.dep exists ) )

    Answered by jabirali
    5 years ago
    0 1
  • Jabir is correct.

    To understand the flags using in the statements of a shell script you should read the bash manual, you can find an online version at and search for the sequence that you are questioning.

    Answered by mfillpot
    5 years ago
    0 1
  • Thanks, that was helpful.

    Answered by saqman2060
    5 years ago
    0 0
  • try here

    there is more talk about linux script

    Answered by
    5 years ago
    0 0
Similar Questions Found
Questions from category Systems Management

Community Answers - Search

Who we are ?

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

More About the foundation...

Frequent Questions

Linux Training / Board

/** BC-056 Ameex changes to add tracking code - 2016-01-22 **/ ?>