Skip to content

Instantly share code, notes, and snippets.

@carlosp420
Last active December 19, 2015 08:39
Show Gist options
  • Save carlosp420/5927809 to your computer and use it in GitHub Desktop.
Save carlosp420/5927809 to your computer and use it in GitHub Desktop.
for processing Mariannas files. Input should be a csv file
# convert marianna's files into bash commmand
sed 's/\(^[0-9]\+\),\(.\+\),.\+\*\(.\+\)/\3\*\1-\2/g' < Genus.csv > Genus.sh
# first part
sed "s/^/sed -i 's\//g" < Genus.sh
# half
sed "s/*/\//g" < Genu.sh
# last
sed "s/$/\/g' *fas \&\& /g" < Genus.sh
# split lines that were accidentally joined
sed 's/,\([0-9]\{4\},\)/\n\1/g'
# add end of line
sed -i -e '$a\' file
# in Vim, add line numbers to text
:%s/$/\=line('.')/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment