I would like to know how to automate an already made shell script (all the steps of all the commands done on a specific folder) by utilizing a list (a .txt) of all folder names that the shell scripts goes and executes
In the working folder called main/ there are subfolders named folder1, folder2, folder3.....folder100 and shell script shell.sh.
I have made a shell script(/bin/sh) that starts a perl script (that I haven't made my self) that's starts a ssh session. The ssh session uses a private/public key to login so no password is needed. The Perl script works perfect.
But when I put it in a cronjob (crontab) the ssh connection asks for password. This makes the scripts fail. Seems like ssh keys are not working while running in cron.
I am currently in Afghanistan and do not have access to some of the resources I normally do back in the US. Just accessed this site and it looks promising! Hopefully you will not find my question too much of a waste of your time.
I write mostly Korn Shell and PERL on Solaris systems for the Army.
I am working on a perl script that must write configuration file. I need to know if the script is running on Ubuntu to set some Ubuntu-specific values (basically, disable the unified bar). The script cannot require any Perl packages that may not be present on user system.
How can I check if the system is Ubuntu or some other Linux distro?