FG
💻 Software

On a Linux shell, what is echo $1 supposed to do?

Fresh5 days ago
Mar 15, 202651732 views
Confidence Score0%
0%

Problem

I do a , it prints out what is the default login shell used. But for onwards, all I get is a newline. Why is that?

Error Output

echo $1

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: On a Linux shell, what is echo $1 supposed to do?

Low Risk

$1 (or $2,$3 ...) is supposed to be the arguments given to some script. Here's an example script: And the example output

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment