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.

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 left

File 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

May be interested

  • How to use Open-Shell in Windows 11How to use Open-Shell in Windows 11
    windows 11 has great out-of-the-box features and what makes it even better is that you can customize this operating system to your liking. however, there are limits to how much you can adjust.
  • Load the stack of assignment operators in C ++Load the stack of assignment operators in C ++
    you can overload the assignment operator (=) as you can with other operators in c ++ and it can be used to create an object like copying constructors.
  • How to create and run a shell script in Ubuntu 20.04 LTSHow to create and run a shell script in Ubuntu 20.04 LTS
    shell is the command interpreter written by the user. script shell helps users write and execute multiple commands at the same time. in this article, you will learn how to execute shell scripts through command line input.
  • How to create and run shell scripts in Ubuntu 22.04How to create and run shell scripts in Ubuntu 22.04
    shell is a user-written command interpreter. script shell helps users write and execute multiple commands at the same time. in this article, readers will learn how to execute shell scripts through command line input.
  • What is Linux Shell? The most popular Linux ShellsWhat is Linux Shell? The most popular Linux Shells
    are you satisfied using the bash shell in linux? or do you want to try an alternative? there are tsch, fish, kornshell and z shell for you to choose from. but which popular linux shell is best?
  • Overload binary operators in C ++Overload binary operators in C ++
    binary operators in c ++ take two parameters. you use binary operators quite often, such as addition operator (+), subtraction operator (-) and division operator (/).
  • Nilesoft Shell - Menu customization application in Windows ExplorerNilesoft Shell - Menu customization application in Windows Explorer
    if you want more control, try nilesoft shell, an open source tool that lets you personalize the context menu to your liking.
  • Shell Sort in data structure and algorithmShell Sort in data structure and algorithm
    shell sort is a highly efficient sorting algorithm based on insertion sorting algorithm (insertion sort). this algorithm avoids the case of swapping positions of two distant elements in the selection algorithm (if the smaller element is in the right position quite far from the larger element on the left).
  • How to download and play Mortal Shell PC for free foreverHow to download and play Mortal Shell PC for free forever
    mortal shell is an action role-playing game with gameplay similar to the famous dark souls. to survive in mortal shell you need to defeat enemies quickly, accurately and without mercy. if you are planning to play mortal shell pc for free, quickly get the mortal shell game for free on the epic store right away.
  • The difference between the == and === operators in JavaScriptThe difference between the == and === operators in JavaScript
    the == operator compares the abstract equality, that is, it performs the necessary type conversions before comparing the equality. the === operator compares strict equality, meaning that it will not perform type conversions.