Check your terminal have bash or not
Show file content
Show file content reversely
Show file content from head
Show file content from tail
Search bash command absolute path
Change current directory to specific directory
Add a new file in current directory
Open file with vim editor
Output text
Thanks to @linuxhint for youtube bash script tutorial.
Here are some basic bash script example to get concept from smooth way.
Output text
Store text in file
Replace file context with input text
Append input text to file context
Single line comment
Multiple line comment
Abbr | Meaning |
---|---|
-eq | equal |
-ne | not equal |
-gt | greater than |
-ge | greater than or equal to |
-lt | less than |
-le | less than or equal to |
-a | and |
-o | or |
Equal case -eq
Compare case >
, <
And case &&
, -a
Or case ||
, -o
While loop
Until loop
For loop
Break
Continue
$0
shows the file path related to current folder
Execute in terminal
Result
args
are dynamic depends on what user inputs
Execute in terminal
Result
Execute in terminal
Result
grep
awk
sed
Work
Bash Script