0

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.

l0b0
  • 55,365
  • 30
  • 138
  • 223
genifer
  • 31
  • 4
  • it is down vote favorite I came across shell scripting already present.Trying to undertand what ${1,,} means here : if [[ ${2} -eq 0 ]]; then delNam=${1,,}delete$date – genifer Mar 23 '16 at 07:28

2 Answers2

1

${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.

l0b0
  • 55,365
  • 30
  • 138
  • 223
0

${2} is for input for second parameter & delNam${1,,}delete$date for input of 1st parameter with current date.