FG

Awk doesn't work when inside double quotes

Fresh3 days ago
Mar 15, 202616095 views
Confidence Score0%
0%

Problem

This command doesn't work: Above ignores the command . I think it might be because of the double quotes? Also, how would I add another set of double quotes inside the awk? ie: I tried escaping the quotes, I even tried this: without success.

Error Output

ssh $HOST "ls -l | awk '{print $1}'"`

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Awk doesn't work when inside double quotes

Low Risk

Variable interpolation is performed within double quotes, so here's what I think might be happening: when you type in , your shell (the one on your local computer, where you are running the SSH client) sees within the double quotes and replaces it w…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment