Timeline for Pass length of argument into bash command substitution
Current License: CC BY-SA 4.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 2, 2019 at 21:43 | comment | added | user232326 |
Or, on a similar concept as sed but without calling an external utility and that works in several shells: printf '%s\n%s\n' "$1" "${1//?/=}" (no eval :-)).
|
|
| Oct 2, 2019 at 20:18 | history | edited | Kusalananda♦ | CC BY-SA 4.0 |
added 30 characters in body
|
| Oct 18, 2018 at 21:32 | comment | added | dx_over_dt |
I was trying to avoid a call to eval but that sed answer works like a charm. Thanks!
|
|
| Oct 18, 2018 at 21:32 | vote | accept | dx_over_dt | ||
| Oct 18, 2018 at 21:19 | history | answered | Kusalananda♦ | CC BY-SA 4.0 |