+ 6
[SOLVED] SHELL. How to detect the terminal type used in linux/unix? Eg, bash, szh... or unix/linux distros
I want to learn do shell scripts compatible with all varieties OS unix/linux distros. And detecting on which distro/arch are executed? I'm developing a script to automatize apps update that don't have canonical repositories or snaps, so I need to download the package using wget. But this package have a bunch of compilations: deb, rpm.... x64, 32bits... Could be extracted from SO properties? Now, I code it for Ubuntu 20.x. The secons part is know which command need to fire unnatended install for each SO: dpkg, sudo apt...? Thanks
7 Respostas
+ 8
echo "$SHELL"
see this for more similar commands👇
https://www.cyberciti.biz/tips/how-do-i-find-out-what-shell-im-using.html
+ 3
I updated the description to clarify...
+ 1
Thanks Martin Taylor . You are awesome!!!
0
Martin Taylor then if for example i'm in a file with bash shellbang header and i want to continue invoke others script i can use $SHELL [file] ?