Advertisement
Tariqul_Islam

Concatenate an array with itself

Aug 9th, 2020
1,179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.08 KB | None | 0 0
  1. #!/bin/bash
  2. arr=($(cat))
  3. arr=("${arr[@]}" "${arr[@]}" "${arr[@]}")
  4. echo ${arr[@]}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement