Click to See Complete Forum and Search --> : c shell help! pretty simple...


nakedandfree
11-08-2000, 05:50 PM
i'm trying to get a pretty basic command down in c shell... the command goes like this:
foreach z (`ls -l ~`)
if (-d $z) then
echo $z
endif
end
what i want it to do is pull up a list of the directories and then print them all on one line (instead of the 10 lines it's currently doing, appending a newline to the end of each line)
but if i do "echo - n "$z "" then the next line it echoes is appended to the end of the same line! so how do i get it to say all the directories on one line, THEN go to a newline to print the next echo?
please email
~
jason

------------------
http://www.nakedandfree.com