Computer Science Fundamentals Operating Systems Objective
Mar 08, 2013

Which of the following shell commands displays the contents of each of the command line arguments one by one

Choose the correct answer:
A) cat $•
B) cat
C) a & b both
D) cat
Detailed Explanation
Use `process.argv` array. First two elements are node path and script path. Actual arguments start from index 2. Example: `process.argv[2]` for first argument. Libraries like `yargs` provide better parsing.
Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback