fork download
  1. echo $PATH | tr ":" "\n" > path.txt
  2. while read line
  3. do
  4. ls -a $line >> programs.txt
  5. done < path.txt
  6. sort programs.txt
Runtime error #stdin #stdout #stderr 0s 19632KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
./prog.sh: line 1: path.txt: Permission denied
./prog.sh: line 1: echo: write error: Broken pipe
./prog.sh: line 5: path.txt: No such file or directory
sort: cannot read: programs.txt: No such file or directory