Korn Shell Operator
This tutorial lists all the operators available in the Korn Shell. Here most of these operators are similar to what we have in the C Program language.
This tutorial lists all the operators available in the Korn Shell. Here most of these operators are similar to what we have in the C Program language.
The operators are listed below in descending order of priority:
Logical and algebraic operators in Unix / Linux
Description Operator + Add a throne (unary operator is the operator of a variable function) - Except a throne! ~ Complementary complementary compensation * Multiplication / division operation Split division + Addition - Subtraction << Left shift >> Right translation == String comparison with! = String comparison is not equal to = ~ Pattern matching & AND Bit permission ^ XOR Bit | OR bit && AND logic || Logical OR + Quantity - Decrease = AssignmentFile checking operators in Unix / Linux
The following table lists the operators that check the various properties of a Unix file.
Operator Description-r file Check if the file is readable, if yes, the condition is true. -w file Check if the file is writable, if it is, the condition is true. -x file Check if the file is executable, if yes, the condition is true. -f file Check if the file is a file that is often in contrast to a particular folder or file, if it is, the condition is true. -s file Check if the file is larger than 0, if it is, the condition is true. -d file Check if the file is a directory, if any, the condition is true. -e file Check if the file exists. It is true even if the file is a directory but exists.According to Tutorialspoint
Previous article: C Shell operators
Next lesson: Flow control in Shell
You've just finished reading the article "Korn Shell Operator" edited by the TipsMake team. You can save korn-shell-operator.pdf to your computer here to read later or print it out. We hope this article has provided you with many useful tech tips and tricks. You can search for similar articles on tips and guides. Thank you for reading and for following us regularly.