Bird
0
0

You want to read a password silently (without showing input) into variable pass. Which command should you use?

hard🚀 Application Q8 of 15
Bash Scripting - User Input
You want to read a password silently (without showing input) into variable pass. Which command should you use?
Aread -s pass
Bread -p pass
Cread pass -silent
Dread --hide pass
Step-by-Step Solution
Solution:
  1. Step 1: Recall silent input option

    The -s flag makes read silent (no echo).
  2. Step 2: Verify correct syntax

    read -s pass correctly reads input silently into pass.
  3. Final Answer:

    read -s pass -> Option A
  4. Quick Check:

    Use -s for silent input with read [OK]
Quick Trick: Use read -s to hide input (e.g., passwords) [OK]
Common Mistakes:
MISTAKES
  • Using -p instead of -s for silent
  • Adding unsupported flags like -silent
  • Misplacing flags after variable name

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Bash Scripting Quizzes