Permissions when iterating over files in directory Unix TCSH scripting -
i'm writing script print file names of every file in subdirectory of home directory. code is:
foreach file (`~/.garbage`) echo "$file" end
when try run script, following error:
home/.garbage: permission denied.
i've tried setting permissions 755 .garbage directory , script, can't on error. there i'm doing incorrectly? it's tcsh script.
why not use ls ~/.garbage
or if want each file on separate line, ls -1 ~/.garbage
Comments
Post a Comment