Question

Which command safely iterates over filenames that may contain spaces and newlines in a shell script?

A for f in $(ls); do ...
B for f in *; do ...
C ls | while read f; do ...
D for f in $(find . -name '*'); do ...
E for f in \ls`; do ...
Practice Next

Hey! Ask a query

🎓
Think You're Ready for RBI Grade B?
RBI Grade B 2026 Phase 1 Memory Based Paper
  • 200 Questions with Detailed Solutions
  • Section-wise Coverage (GA, English, Quant & Reasoning)