How do I build a script in windows or GNU/Linux that checks if certain files/programs exist in the machine, and then either apologize to the user or downloads and installs them for theuser if they do not exist?
wget echo print grep fgrep maybe ....make a empty file called sorry.sh ...make its permissions 755 and executeable.
if [ -e /file/name ] then echo "Goodee!" else wget blah blah blah fi
Thanks; now I'm automating the whole 'download and install and configure program for my colleagues. Unfortunately, most of my colleagues are using Windows machines, so I must translate the script to Windows :( What is the cmd.exe/powershell equivalent of commands like grep or wget? I've heard that powershell is more powerful that most UNIX shells like bash, csh, tcsh, etc. so I will keep searching for a solution for my colleagues :D
I don't know anything about scripting on Win myself, but I know that a lot of people use AutoHotkey for writing simple scripts.
probably on windows I would look for ftp or http servers to get the files I need and then use print statements pause statement and stuff and develop it using the FTP commands plenty of refrence out there for powershell....but if you want a powerful shell that is fairly simple to use I suggest using Linux....windows tends to be overly complex for my taste when writing complex scripts. Linux can download all the required files for a windows machine put them on say a ftp server or ssh and then a simple windows script can download the required files and print your messages...lots and lots of possibilities
Join our real-time social learning platform and learn together with your friends!