C Shell operators
This tutorial lists all the operators available in C Shell. Here, most operators are similar to those we have in the C Programming Language.
This tutorial lists all the operators available in C Shell. Here, most operators are similar to those we have in the C Programming Language.
Operators are listed in descending order of priority.
Logical and arithmetic operators in Unix / Linux
Operator Description () Change of priority ~ Compensation! Negative permission * Multiplication / Division% Split division + Addition - Subtraction << Left shift >> Right translation == Comparing string with! = Comparing string not equal = ~ Matching pattern & AND Bit permission ^ XOR Bit (Or exclude) | OR bit && AND logic || Logical OR logic + Quantitative - Decrease = Assignment * = Multiply left to right and assign to left / = Divide left to right and assign to left + = Add left and right and assign to the left - = Subtract the left to the right and assign to the left ^ = XOR to the left and right and assign the result to the left% = Divide to the left and to the right and get the left to the leftFile checking operators in Unix / Linux
The following table lists the operators to check the various characteristics 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 writeable, if yes, the condition is true. -x file Check if the executable file (execute) is true or not, 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. -z 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. Is true even if it is a directory but exists. -o file Check if the user owns the file. It returns true if the user is the owner of the file.According to Tutorialspoint
Previous article: Basic Shell operators
Next post: Operator Korn Shell
5 ★ | 1 Vote
You should read it
- Korn Shell Operator
- Basic Shell operators
- Basic file system in Unix / Linux
- Network communication utilities in Unix / Linux
- System log in Unix / Linux
- What is Unix / Linux?
- Regular Expression in Unix / Linux
- Use variables in Shell
- File Management in Unix / Linux
- Useful commands in Unix / Linux
- Manage folders in Unix / Linux
- Micro editor in Unix / Linux