-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix recreate symlink issue + mac2unix/dos2unix replacement #106
base: master
Are you sure you want to change the base?
Conversation
mac2unix "${sampsheet}" | ||
SAMPLESHEET_SEP="," | ||
cp "${sampsheet}"{,.converted} | ||
sed -i 's/\r/\n/g' "${sampsheet}.converted" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sed -i 's/\r/\n/g' "${sampsheet}.converted" | |
printf '\n' >> "${sampsheet}.converted" | |
sed -i 's/\r/\n/g' "${sampsheet}.converted" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The updated code replaces both mac2unix as well as dos2unix resulting whatever2unix. Another typical error is a missing line end character on the last line. The suggestion above inserts a line end character before the
sed -i "/^[\s${SAMPLESHEET_SEP}]*$/d" "${sampsheet}.converted"
line which removes empty lines. So if it was not necessary to add another line end character the sed
that removes empty lines will fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check, updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See inline
No description provided.