Skip to content

Instantly share code, notes, and snippets.

@dewomser
Created August 14, 2024 10:23
Show Gist options
  • Select an option

  • Save dewomser/72949b30a3b7c04bceb086a0b5731124 to your computer and use it in GitHub Desktop.

Select an option

Save dewomser/72949b30a3b7c04bceb086a0b5731124 to your computer and use it in GitHub Desktop.
#Bash 1-liner. Make a List and afterwards insert new line with content. 3 different ways to do this
#linux #bash
von 1 bis 3 Zählen und dann nachträglich 2,7 in die Liste einfügen, old school
seq 3|sed ' 2 a 2.7
oder modern (so ähnlich)
echo {{1..3},3.7,{4..9}}'
So!
for i in {1..5}; do echo -e ${i/3/"3\n3.7"}; done
@dewomser
Copy link
Copy Markdown
Author

So siehts aus.
Bildschirmfoto_20240814_090614

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment