Loading, please wait...

A to Z Full Forms and Acronyms

How to print program name using command line argument in Linux Shell Script | Linux Shell Script

Jun 24, 2021 LinuxShellScript, 398 Views
How to print program name using command-line argument in Linux Shell Script | Linux Shell Script

How to print program name using command-line argument in Linux Shell Script | Linux Shell Script

We will create a shell script program to print the program name using the $0 variable on the console screen.

#!/bin/bash


# Program name: "script_name.sh"


echo "Script program Name: $0"
A to Z Full Forms and Acronyms