🌷 Esparzo 🌷
Friday, 12 February 2021
How to do I send parameters to bash script / shell script?
Email This
BlogThis!
Share to X
Share to Facebook
Share to Pinterest
You can send parameters from command-line to a bash script using $1 $2 ...
$1 represents parameter 1
$2 represents parameter 2
likewise
For Example:
startup.sh
#!/bin/bash
echo
hello
$1
$2
on command line :
./startup.sh dinesh dontha
output
:
hello dinesh dontha
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment