New Line after link #319

Closed
opened 2026-01-19 18:29:52 +00:00 by michael · 1 comment
Owner

Originally created by @edumorlom on GitHub.

Currently, the link is displayed as follows. There should be a new line after the link.
https://transfer.sh/xxxx/modeltester.pyeduardo@server:~/Desktop$

Originally created by @edumorlom on GitHub. Currently, the link is displayed as follows. There should be a new line after the link. https://transfer.sh/xxxx/modeltester.pyeduardo@server:~/Desktop$
Author
Owner

@kzaidi commented on GitHub:

You can just add a newline and some text to it to make it better. For example, I added some text and then a newline to my script. Here is what I did:

#Transfer.sh
transfer() { if [ $# -eq 0 ]; then echo -e "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"; return 1; fi
tmpfile=$( mktemp -t transferXXX ); if tty -s; then basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g'); curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile; else curl --progress-bar --upload-file "-" "https://transfer.sh/$1" >> $tmpfile ; fi; echo "URL to download this file from, will only be valid for 14 days: ";cat $tmpfile; echo " "; rm -f $tmpfile; }

@kzaidi commented on GitHub: You can just add a newline and some text to it to make it better. For example, I added some text and then a newline to my script. Here is what I did: #Transfer.sh transfer() { if [ $# -eq 0 ]; then echo -e "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"; return 1; fi tmpfile=$( mktemp -t transferXXX ); if tty -s; then basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g'); curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile; else curl --progress-bar --upload-file "-" "https://transfer.sh/$1" >> $tmpfile ; fi; **echo "URL to download this file from, will only be valid for 14 days:** ";cat $tmpfile; **echo " "**; rm -f $tmpfile; }
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dutchcoders/transfer.sh#319