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

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

css - Can I use the :after pseudo-element on an input field? -