I came across shell scripting already present.Trying to undertand what ${1,,} means here :
if [[ ${2} -eq 0 ]]; then
delNam${1,,}_delete_$date
new to shell scripting.
I came across shell scripting already present.Trying to undertand what ${1,,} means here :
if [[ ${2} -eq 0 ]]; then
delNam${1,,}_delete_$date
new to shell scripting.
${1,,}
will convert the first positional parameter to lowercase. In other words, if the script was run like ./script.sh FooBar 0
and $date
is 2016
, the second line will expand to delNamfoobar_delete_2016
, which will then be run as a command.
${2} is for input for second parameter & delNam${1,,}delete$date for input of 1st parameter with current date.