If given in the command line you have to press enter after each command.
ls -1 | grep '.tgz'`;
ENTER
do tar -xzf $file;
ENTER
........
if not make a script with only one command for each line:
ls -1 | grep '.tgz'`;
do tar -xzf $file;
done;
............................
do you have the PATH variable set?
if you run the first command:
ls -1 | grep '.tgz'`;
what is the output?
If a list is not prompted you have to provide full paths to executables or insert the PATH variable into your profile file.
You're missing the beginning for loop for the proper syntax. The line should be:
for file in `ls -1 | grep '.tgz'`;do tar -xzf $file;done;for folder in `ls -1 | grep -v '.tgz'`;do cd $folder;esxupdate -n update;cd ..;done;
However[/b], I would not recommend using this script to install ESX Patches. ESX Patches have to be installed in the proper order (by release date), and this script will just install the patches ordered by their numerical names, which do not correlate to release date. This will result in packages either not being installed or an older version of the package being installed.
Hey remember to assign point for helpful and correct answers.
