Skip To Content

CyberSecurity Blog

CyberSecurity is a key for a safer world, It is EveryWhere

  • Home
  • Pentest
  • Linux
  1. Home
  2. Category: scripting

Category: scripting

sh vs bash vs ksh vs csh

Posted By: adminPosted On: June 10, 2020
sh vs bash vs ksh vs csh
linux shell vs bash vs ksh vs csh

Since the Bourne Again SHell is a superset of sh, all sh commands will also work in bash – but not vice versa. bash has many more features of its own, and, as the table below demonstrates, many features incorporated from other shells.

Categories: scriptingTags: bash,csh,ksh,Linux,script,sh,sh vs bash vs ksh vs csh,shell

Bash common features

Posted By: adminPosted On: June 10, 2020
Bash common features
linux bash common features

The following features are standard in every shell. Note that the stop, suspend, jobs, bg and fg commands are only available on systems that support job control.

Categories: scriptingTags: bash,break,common features,continue,eval,Linux,script,shell,shift,stop

Bash catching signals

Posted By: adminPosted On: June 10, 2020
Bash catching signals
linux bash catching signals

Your system contains a man page listing all the available signals, but depending on your operating system, it might be opened in a different way.

Categories: scriptingTags: bash,catching,kill -l,Linux,script,shell,signals

Bash functions

Posted By: adminPosted On: June 10, 2020
Bash functions
bash functions

Shell functions are a way to group commands for later execution, using a single name for this group, or routine. The name of the routine must be unique within the shell or script. All the commands that make up a function are executed like regular commands.

Categories: scriptingTags: bash,function,functional programming,functions,Linux,script,shell

Bash advanced variables

Posted By: adminPosted On: June 10, 2020
Bash advanced variables
bash arrays

There are cases when you want to avoid this kind of behavior, for instance when handling telephone and other numbers. Apart from integers and variables, you may also want to specify a variable that is a constant. This is often done at the beginning of a script, when the value of the constant is declared.

Categories: scriptingTags: advanced variables,array,bash,bash array,constants,Linux,shell

Bash select menu and shift

Posted By: adminPosted On: June 10, 2020
Bash select menu and shift
bash select menu

The select construct allows easy menu generation.

Categories: scriptingTags: bash,Linux,loop,menu,script,select,selective menus,shell

Bash repetitive tasks ( for , while , until )

Posted By: adminPosted On: June 10, 2020
Bash repetitive tasks ( for , while , until )
Bash repetitive tasks ( for , while , until )

To run a specific task or list of commands repetitively on bash script , you need to use on of this three constructions : for , while , until . Each one fits different situation as we will know now.

Categories: Linux,scriptingTags: bash,Bash repetitive tasks ( for,break,conditions,continue,for,Linux,loop,repeat,script,scripting,shell,until,while

Bash interactive scripts

Posted By: adminPosted On: June 10, 2020
Bash interactive scripts
bash interactive scripts

Some scripts run without any interaction from the user at all. Advantages of non-interactive scripts include: The script runs in a predictable way every time. The script can run in the background.

Categories: scriptingTags: bash,echo,errors,input,interactive,Linux,output,read,redirect,scripts

Bash conditional if and case statements

Posted By: adminPosted On: June 10, 2020
Bash conditional if and case statements

At times you need to specify different courses of action to be taken in a shell script, depending on the success or failure of a command. The if construction allows you to specify such conditions.

Categories: Linux,scriptingTags: bash,case,conditional,elif,else,esac,if,Linux,script,scripting,statement,then

How to use awk

Posted By: adminPosted On: June 10, 2020
How to use awk

AWK is another popular stream editor, just similar to SED. The basic function of awk is to search files for lines or other text units containing one or more patterns. When a line matches one of the patterns, special actions are performed on that line.

Categories: Linux,scriptingTags: arrange,awk,editor,extract,how to use awk,Linux,script,scripting,stream,text,unix

Posts navigation

Page 1 Page 2 Next page

Recent

  • Vulnhub Hackme Walkthrough
  • Vulnhub JOY Writeup
  • CyberTalents Shadower Machine Walkthrough
  • Vulnhub NullByte Writeup
  • Vulnhub Toppo Writeup

Tags

7 access bash bit break centos chmod continue echo expression file ftp group hacking hat how to share files on linux http header jobs Linux linux bash scripting tutorial linux file server linux firewall loop oscp owasp password penetration pentest pentest reporting permission red regular schedule script scripting secure server shell sticky tasks ubuntu user vsftp Web Application Penetration Testing what is HTTP Protocol

Recent Posts

  • Vulnhub Hackme Walkthrough
  • Vulnhub JOY Writeup
  • CyberTalents Shadower Machine Walkthrough

Recent Comments

  • Nikita on How to install Kali Linux tools on Ubuntu based OS
  • love spell on CentOS 7 PXE Server
  • m.ilchi on Linux Time Synchronization with chrony
HoruSec©Copyright 2020. | Proudly powered by WordPress