Skip to main content
14 events
when toggle format what by license comment
Apr 12, 2018 at 12:00 vote accept Joe
Apr 11, 2018 at 17:45 comment added Jeff Schaller Happy to hear! You should be able to click the check mark to tell future viewers that this solved your problem.
Apr 11, 2018 at 17:39 comment added Joe Thanks, that did the trick, and the script works well. I appreciate the help!
Apr 11, 2018 at 16:59 comment added Jeff Schaller Even something like cat > scriptfile (Enter) (paste script) then hit control-d; would create the file in a simple way.
Apr 11, 2018 at 16:56 comment added Joe That's probably it, thanks. I'm terrible with VIM so I'll try something on Mac maybe.
Apr 11, 2018 at 15:48 comment added Jeff Schaller The \r in there makes me wonder if the script was edited in a DOS/WINDOWS mode, leaving carriage returns in the file. Try creating the file with a different editor, with a native Unix editor, or in a different editor save mode.
Apr 11, 2018 at 15:18 comment added Joe Sorry for the bad formatting, I coulnd't figure out the forum syntax.
Apr 11, 2018 at 15:17 comment added Joe + unset export_module + '[' -n '' ']' + '[' 4 -ge 3 ']' + '[' -r /usr/share/lmod/lmod/init/lmod_bash_completions ']' + '[' -n '' ']' + changes=$'1\r' /home/username/scripts/MvDuplicates.sh: MvDuplicates.sh: line 6: syntax error nea' unexpected token do 'home/username/scripts/MvDuplicates.sh: MvDuplicates.sh: line 6: do
Apr 11, 2018 at 15:17 comment added Joe [username@text test]$ bash -x MvDuplicates.sh + LMOD_PKG=/usr/share/lmod/lmod + LMOD_DIR=/usr/share/lmod/lmod/libexec + LMOD_CMD=/usr/share/lmod/lmod/libexec/lmod + MODULESHOME=/usr/share/lmod/lmod + export LMOD_PKG + export LMOD_CMD + export LMOD_DIR + export MODULESHOME + '[' -z -XqeMRF ']' + '[' -z more ']' + LMOD_VERSION=6.0.15 + export LMOD_VERSION + '[' : '!=' : ']' + unalias ml + true ++ echo YES ++ tr '[:upper:]' '[:lower:]' + export_module=yes + '[' -n '4.1.2(1)-release' -a yes '!=' no ']' + export -f module + export -f ml
Apr 11, 2018 at 15:17 comment added Joe I then explicitly ran it with bash to be sure: "bash -x MvDuplicates.sh"
Apr 11, 2018 at 15:16 comment added Joe I created a .sh file with the code, and here's what I got: [username@text test]$ MvDuplicates.sh /home/username/scripts/MvDuplicates.sh: line 6: syntax error near unexpected toke' do 'home/username/scripts/MvDuplicates.sh: line 6: do
Apr 11, 2018 at 15:12 comment added Jeff Schaller Did you run it with bash, @Joe? What's the error you get?
Apr 11, 2018 at 15:07 comment added Joe Thank you for the script! Unfortunately I'm getting a syntax error, and being a Linux noob, I don't know how to resolve it.
Apr 9, 2018 at 15:43 history answered Jeff Schaller CC BY-SA 3.0