Scripting Mac OS X
Subject:   loginhook
Date:   2004-03-04 13:26:16
From:   jamesreynolds
Response to: loginhook

$1 for a shell script is the first variable passed into the script. The Loginwindow passes in the username only, not "/Users/". I don't know why you got the error you did. I got:

touch: ~james/Library/Preferences/thisisatest.txt: No such file or directory

If I changed the script to:

/usr/bin/touch /Users/$1/Library/Preferences/thisisatest.txt

then it works.

1 to 1 of 1
  1. loginhook
    2004-03-04 14:26:25  yantheman [View]

    • loginhook
      2004-03-04 14:35:07  jamesreynolds [View]

1 to 1 of 1