How can I do with bash
echo "line1 from file2" >> echo "line1 from file1"
?

@matrix Not sure if I understand it correctly. You have one file with lines and one with filenames and you want to write line from first file with name from the second file?

@matrix seq `wc file1 | awk -c '{print $1}'` | parallel -- 'sed -n {}p file1 >> `sed -n {}p file2 | tr -d "\n"`'

Sign in to participate in the conversation
Game Liberty Mastodon

Mainly gaming/nerd instance for people who value free speech. Everyone is welcome.