▲ 15 ▼ Which command substitution do you prefer in shell scripts: backquotes `` or $() syntax? (ani.social) submitted 1 year ago by kiri@ani.social to c/linux@programming.dev 10 comments fedilink hide all child comments Looks like $(...) is better, but I still pretty often see `...` in some articles.
[–] red_bull_of_juarez@lemmy.dbzer0.com 7 points 1 year ago (1 child) I'm using fish, so it's (). permalink fedilink source hideshow 1 child comment replies: [–] trevor@lemmy.blahaj.zone 2 points 1 year ago I prefer this as well, but just adding that Fish also supports $() for those that don't know. I keep hearing people that haven't used modern versions of Fish say that it's somewhat different from Bash and strays from POSIX compatibility quite a bit. While the latter is true, Fish has added many bash-isms over the years, so most scripting idioms you're familiar with will work there too. permalink fedilink source parent
[–] trevor@lemmy.blahaj.zone 2 points 1 year ago I prefer this as well, but just adding that Fish also supports $() for those that don't know. I keep hearing people that haven't used modern versions of Fish say that it's somewhat different from Bash and strays from POSIX compatibility quite a bit. While the latter is true, Fish has added many bash-isms over the years, so most scripting idioms you're familiar with will work there too. permalink fedilink source parent