Bird
0
0

In bash scripting, what is the primary function of the here string operator <<<?

easy🧠 Conceptual Q1 of 15
Bash Scripting - Text Processing in Scripts
In bash scripting, what is the primary function of the here string operator <<<?
ATo execute a command in the background
BTo append output to a file
CTo redirect a string as input to a command
DTo create a new file with given content
Step-by-Step Solution
Solution:
  1. Step 1: Understand here string usage

    The here string operator <<< sends a string as standard input to a command.
  2. Step 2: Differentiate from other redirections

    It is not used for appending output, background execution, or file creation.
  3. Final Answer:

    To redirect a string as input to a command -> Option C
  4. Quick Check:

    Here string sends string input [OK]
Quick Trick: Here string sends a string as input to commands [OK]
Common Mistakes:
MISTAKES
  • Confusing here string with output redirection
  • Thinking it runs commands in background
  • Assuming it creates or modifies files

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Bash Scripting Quizzes