I would like to print git log in bash script line by line, current script output in one line, I guess need to split it by some way but not work!
#!/bin/bash
x=$(git log --oneline --no-merges -n 5)
echo $x
IFS=$'\n' lines=( $(echo $x) )
for line in lines; do
echo $line
done