diff options
Diffstat (limited to 'bin/sue')
-rwxr-xr-x | bin/sue | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -33,13 +33,9 @@ case $1 in ;; esac -# Pull arguments into an array -declare -a files -files=("$@") - # Iterate through the files and check they all have the same owner user= -for file in "${files[@]}" ; do +for file ; do # Use stat(1) to get the file owner if ! file_owner=$(stat -c %U -- "$file") ; then @@ -63,5 +59,5 @@ done # If we got this far, there's at least one file and all the files are owned by # the same user; we can safely edit them -exec sudoedit -u "$user" -- "${files[@]}" +exec sudoedit -u "$user" -- "$@" |