I'm new to Linux and I want to write a skript. Can you guys please help me?
I know it should start with:
I would like to check if system information (I found it's done with uname -a
) is the same as the system information of machine on which the script has been written. Something like script was written on system XYZ and if I use it on system ZYX it will show something like: This is not a same system on which this script was written.
I guess it's done with if... something like:
if uname -a =! current uname -a then echo "This is not..."
But I don't know syntax to scripting :/
But a main thing I want about this script is that I want it to set up run access for scripts. I manually add location to some folder and script will find .sh files if there are any and check them if they have run access set up. If they don't have run access the script will set it up. I don't have any idea of how this should be done. Is it possible it's done with this? find /path/to/toplevel/dir
I would be glad for any help. Thank you.