Public
Authored by Nicholas Chambers 👻

Whitespace-separated assignments in Bash

A hack to allow whitespace-separated assignments

Edited
assign.bash 316 Bytes
  • [nickchambers@qa:~]$ . code/assign.bash
    [nickchambers@qa:~]$ declare -p foo
    -bash: declare: foo: not found
    [nickchambers@qa:~]$ uhoh not a command
    -bash: uhoh: command not found
    [nickchambers@qa:~]$ foo = a kitten purrito
    [nickchambers@qa:~]$ declare -p foo
    declare -- foo="a kitten purrito"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment