Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

RoanKanninga
Copy link
Member

No description provided.

mac2unix "${sampsheet}"
SAMPLESHEET_SEP=","
cp "${sampsheet}"{,.converted}
sed -i 's/\r/\n/g' "${sampsheet}.converted"
Copy link
Member

@pneerincx pneerincx Mar 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sed -i 's/\r/\n/g' "${sampsheet}.converted"
printf '\n' >> "${sampsheet}.converted"
sed -i 's/\r/\n/g' "${sampsheet}.converted"

Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check, updated

Copy link
Member

@pneerincx pneerincx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See inline

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants