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

Mar 08, 2022 LinuxShellScript, 3017 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