by WeCanCode-Author | Dec 27, 2020 | 3 Minutes : Tutorials , How-To
Learn to write your first shell script to print “Helloworld”?
Come lets Learn to write your first shell script will be the baby step for learning shell programming.
Any programming language or script it be, start it with “Hello world”.
Why start with Hello world?
W riting your first program to print “Hello world”, will allow you to learn the basic setup of the environment, configurations, and more.
VIDEO
https://youtu.be/yxmI8pS2wN0
hello_world.sh
#!/bin/bash
echo "Hello world"
Save the file, then to run open the terminal, and type ./hello_world.sh
PS: You might get permission denied error, due to hello_world.sh file not having execute permission for any users.
Use “chmod +x hello_world.sh” to provide execute permission.
T his first line (#!/bin/bash or #!/bin/sh) has a name. It is known as ‘she-bang‘ (shabang). This derives from the concatenation of the tokens sharp (#) and bang (!).
It is also called as sh-bang, hash-bang, pound-bang or hash-pling. In computing, a she-bang is the character sequence consisting of the characters number sign and exclamation mark (#!) at the beginning of a script.
~3Minutes: Tutorial
by WeCanCode-Author | Dec 27, 2020 | 3 Minutes : Tutorials , How-To
How to check disk usage in unix terminal?
Here is how you can check disk usage in unix terminal.
Disk usage is a critical thing in servers, Certain times the web service or server acts weird and it could be disk space being full.
In order to check the disk space we can use “df” command in unix. which will show us the disk/file system, used and available disk quantity. also the mount location of the disk.
We have discussed below listed commands
df – disk usage checking man – man is nothing but manual, by passing the command as parameter to this command will open the manual for the command in parameter.
VIDEO
https://youtu.be/kqVzUOZMSY0
df command
aryanz_co_in@pop-os:~$ df -h
df: /run/user/1001/doc: Operation not permitted
Filesystem Size Used Avail Use% Mounted on
tmpfs 1.6G 2.1M 1.6G 1% /run
/dev/sda2 723G 111G 575G 17% /
tmpfs 7.8G 87M 7.7G 2% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 4.0M 0 4.0M 0% /sys/fs/cgroup
/dev/sda1 1.5G 199M 1.3G 14% /boot/efi
~3Minutes: Tutorial
by WeCanCode-Author | Dec 25, 2020 | 3 Minutes : Tutorials , How-To
Here we are going to see how to Check the port used by any process in unix?
Check the port used by any process in unix?
Here is how you can check port used by any process in unix terminal.
While developing any webservice or web server you might end up using existing port number and will face issue while starting the server
Before such thing happens, better to check the port is being used by any process already to avoid such conflicts. Its saves us more time.
We have discussed below listed commands
netstat – network utility used for checking the connection of TCP/UDP ss – Socket statistics, similar to netstat but faster. sudo – Run any command with root or super user level/mode.
VIDEO
https://youtu.be/kqVzUOZMSY0
netstat command
aryanz_co_in@pop-os:~/dev/folder1$ sudo netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:33060 0.0.0.0:* LISTEN 5314/mysqld
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 5314/mysqld
udp 0 0 127.0.0.53:53 0.0.0.0:* 4434/systemd-resolv
ss command
aryanz_co_in@pop-os:~/dev/folder1$ sudo ss -tulpn
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
udp UNCONN 0 0 127.0.0.53%lo:53 0.0.0.0:* users:(("systemd-resolve",pid=4434,fd=12))
tcp LISTEN 0 70 127.0.0.1:33060 0.0.0.0:* users:(("mysqld",pid=5314,fd=32))
tcp LISTEN 0 151 127.0.0.1:3306 0.0.0.0:* users:(("mysqld",pid=5314,fd=34))
~3Minutes: Tutorial
by WeCanCode-Author | Dec 21, 2020 | Stock
How to check ipo allotment status? or Have you recently ordered Mrs Bectors Food IPO?
Hope you must have waited for IPO allotment status, you can check in 2 ways. Come Let’s see what are the ways?
BSE Website – https://www.bseindia.com/investors/appli_check.aspx Link Intime India – https://linkintime.co.in/ipo/public-issues.html
What do you need to have in handy before checking the status?
Name: Mrs Bectors Food Specialities Application Number (You can check your broker or provider site) PAN Card DP/Client ID (optional) Account No & IFSC (optional)
How to check ipo allotment status?
BSE Website
Goto this link https://www.bseindia.com/investors/appli_check.aspx
Choose Issue Type as Equity Choose Issue Name as Mrs Bector food Application No (IPO Application number) PAN No.
Link Intime India
Goto this link https://linkintime.co.in/ipo/public-issues.html
Pick “Mrs Bectors” as the company Select PAN/App. No. (or) DP/Client ID (or) Account No & IFSC Based on the choices, fill the form accordingly.
Link Intime India IPO Status checking form
As of dated 21-22 Dec 202 0 : The IPO Allocation is done and you can check the status now.