First thing that comes into my mind:
read -r a b c <<<$(echo 1 2 3) ; echo "$a|$b|$c"
output is, unsurprisingly
1|2|3
More Related Contents:
- create a file with prefix =file1 followed by the random number
- Why to code a script which will check if some package is installed in linux and if not then install it?
- What’s the magic of “-” (a dash) in command-line parameters?
- Aborting a shell script if any command returns a non-zero value
- Is there a “goto” statement in bash?
- Shell script: Run function from script over ssh
- How can I quickly sum all numbers in a file?
- How can I generate new variable names on the fly in a shell script?
- Bash while read loop extremely slow compared to cat, why?
- Bash script process substitution Syntax error: “(” unexpected
- What is the difference between using `sh` and `source`?
- Find multiple files and rename them in Linux
- Setting environment variables in Linux using Bash
- How can I loop over the output of a shell command?
- Does “argument list too long” restriction apply to shell builtins?
- Given two directory trees, how can I find out which files differ by content? [closed]
- Using the passwd command from within a shell script
- Add a bash script to path
- Command to get time in milliseconds
- Get last dirname/filename in a file path argument in Bash
- Bash script execution with and without shebang in Linux and BSD
- bash command not found when setting a variable
- Exit code of variable assignment to command substitution in Bash
- Linux/Unix command to determine if process is running?
- Syntax with pound and percent sign after shell parameter name [duplicate]
- Get ceiling integer from number in linux (BASH)
- bash, command not found [duplicate]
- How to convert hex to ASCII characters in the Linux shell?
- Linux shell script to add leading zeros to file names
- How to avoid race condition when using a lock-file to avoid two instances of a script running simultaneously?