osx - bash script mv command not working -
i'm trying write script renames file @ login in osx lion.
here script far:
#!/bin/bash if [ -f /users/$1/library/google/googlesoftwareupdate/googlesoftwareupdate.bundle/contents/macos/ksadmin ]; mv ~/library/google/googlesoftwareupdate/googlesoftwareupdate.bundle/contents/macos/ksadmin ~/library/google/googlesoftwareupdate/googlesoftwareupdate.bundle/contents/macos/ksadmin1 "successful" else "unsuccessful" fi
i've created loginhook executes script. know executes @ login because computer speaks when can finds "ksadmin" file. know finds "ksadmin" file because computer says "successful". have manually renamed file, logged out, in , computer says "unsuccessful".
the problem script doesn't rename "ksadmin" "ksadmin1". have written command properly?
any ideas great.
morgan
what permissions on ksadmin? if it's read login id , ksadmin1 exists, may need mv -f. also, may want expand "~" absolute path. not sure when script gets executed perhaps bash can not yet expand it.
Comments
Post a Comment