The shell script is trying to add a line containing a different string of the same format on a specific line in the yml file.
For example,

  en: 'English'
  ja: 'Japanese'
  id: 'Indonesian'
Assuming there are multiple lines of the same format like


below this line
  de: 'German'
  sp: 'Spanish'
I would like to add in a similar format every two lines, such as

, using a script such as sed or grep from a shell file such as atest.shfile.
I think I thought it was wrong for a while,
target_row = cat ./test.sh | grep 'Indonesian'
After output, I was stuck at the point where I wanted to use it by storing it in a variable with redirect.
If i have other better ways, please give me a professor.

Supplemental information (FW/tool version etc.)

The terminal uses Iterm2 on Mac, so the kernel is UNIX.