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

Capture and play voice with Asterisk ARI -

java - Why database contraints in HSQLDB are only checked during a commit when using transactions in Hibernate? -

visual studio - Installing Packages through Nuget - "Central Directory corrupt" -