Closed wicknet closed 6 years ago
Wick,
In general aliases are not effective in shell scripts. I do the followingij my scripts:
gam="/Users/admin/bin/gam/gam" $gam user joe@myschool.org mailto:joe@myschool.org update photo joe.jp $gam user moe@myschool.org mailto:moe@myschool.org update photo moe.jp $gam user curly@myschool.org mailto:curly@myschool.org update photo curly.jpg
Or add ""/Users/admin/bin/gam" tp $PATH.
Ross
-- ross.scroggs@gmail.com
On Jun 7, 2018, at 5:21 PM, Wick Net notifications@github.com wrote:
The issue tracker is for reporting product deficiencies. "How do I?" questions should be posted to the discussion forum at https://groups.google.com/group/google-apps-manager https://groups.google.com/group/google-apps-manager. When in doubt, start at the discussion forum and return here only when instructed to do so.
Please confirm the following:
I have upgraded to the latest GAM release from https://git.io/gamreleases https://git.io/gamreleases and I still have this issue. I am typing the command as described in the GAM Wiki at https://github.com/jay0lee/gam/wiki https://github.com/jay0lee/gam/wiki Full steps to reproduce the issue:
Installed latest version of gam in /Users/admin/bin/gam created txt file as myshell.sh with gam commands, one per line, such as gam create user xxx or gam update user xxx chmod 755 shell file and then run with bash command. Expected outcome (what are you trying to do?):
Each line in shell file should run as a gam command: Eg gam user joe@myschool.org mailto:joe@myschool.org update photo joe.jpg gam user moe@myschool.org mailto:moe@myschool.org update photo moe.jpg gam user curly@myschool.org mailto:curly@myschool.org update photo curly.jpg (the jpg are stored in same directory as shell file, hence no path is given)
Actual outcome (what errors or bad behavior do you see instead?): myshell.sh: line 1: gam: command not found myshell.sh: line 2: gam: command not found myshell.sh: line 3: gam: command not found myshell.sh: line 4: gam: command not found myshell.sh: line 5: gam: command not found myshell.sh: line 6: gam: command not found
However, if I change each gam command in shell file as ./gam, then the batch file runs as expected. Adding an alias before the commands with alias gam="/Users/admin/bin/gam/gam" > does not work.
This seems to be new behavior of the gam command, as I've been using it for years and setting an alias or using gam.py in bulk batch updates used to work fine.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jay0lee/GAM/issues/734, or mute the thread https://github.com/notifications/unsubscribe-auth/AIU8L2VVmEbYpz-alurRcTUuFYszXm_Vks5t6cOLgaJpZM4UfT8m.
Just tested it.. works great. Thank you SO much!
The issue tracker is for reporting product deficiencies. "How do I?" questions should be posted to the discussion forum at https://groups.google.com/group/google-apps-manager. When in doubt, start at the discussion forum and return here only when instructed to do so.
Please confirm the following:
Full steps to reproduce the issue:
Expected outcome (what are you trying to do?):
Each line in shell file should run as a gam command: Eg gam user joe@myschool.org update photo joe.jpg gam user moe@myschool.org update photo moe.jpg gam user curly@myschool.org update photo curly.jpg (the jpg are stored in same directory as shell file, hence no path is given)
Actual outcome (what errors or bad behavior do you see instead?): myshell.sh: line 1: gam: command not found myshell.sh: line 2: gam: command not found myshell.sh: line 3: gam: command not found myshell.sh: line 4: gam: command not found myshell.sh: line 5: gam: command not found myshell.sh: line 6: gam: command not found
However, if I change each gam command in shell file as ./gam, then the batch file runs as expected. Adding an alias before the commands with alias gam="/Users/admin/bin/gam/gam" does not work.
This seems to be new behavior of the gam command, as I've been using it for years and setting an alias or using gam.py in bulk batch updates used to work fine.