4 edited tags
| link
3 edited tags
| link
2 deleted 2 characters in body; edited title
source | link

Why are there three syntaxessyntax for setting variables in shell scripts?

root@ubuntu:~# echo ${x=1}
1
root@ubuntu:~# echo ${x:=1}
1
root@ubuntu:~# echo ${x-1}
1
root@ubuntu:~# 

Why are there three syntaxessyntax for setting variables in shell scripts?

What is the technical advantage of having three syntax?

Even programming languages do not have more than one.

Why are there three syntaxes for setting variables in shell scripts?

root@ubuntu:~# echo ${x=1}
1
root@ubuntu:~# echo ${x:=1}
1
root@ubuntu:~# echo ${x-1}
1
root@ubuntu:~# 

Why are there three syntaxes for setting variables in shell scripts?

Why are there three syntax for setting variables in shell scripts?

root@ubuntu:~# echo ${x=1}
1
root@ubuntu:~# echo ${x:=1}
1
root@ubuntu:~# echo ${x-1}
1
root@ubuntu:~# 

Why are there three syntax for setting variables in shell scripts?

What is the technical advantage of having three syntax?

Even programming languages do not have more than one.

1
source | link