The manpage for the fedora csh describes the usage of goto, but it does not work. Anyone with insight on this?
If you CAN make it work, please provide a skeleton of the script where the label is visible and the goto statement is visible :)
Thanx.
Hallo,
JD jd1008@gmail.com writes:
The manpage for the fedora csh describes the usage of goto, but it does not work. Anyone with insight on this?
If you CAN make it work, please provide a skeleton of the script where the label is visible and the goto statement is visible :)
what does 'does not work' mean? What have you tried so far? It's straight forward, I think.
#!/bin/csh
label: printf "foo" sleep 1 goto label
Regards hmw
On 08/21/17 09:16, Michael Welle wrote:
Hallo,
JD jd1008@gmail.com writes:
The manpage for the fedora csh describes the usage of goto, but it does not work. Anyone with insight on this?
If you CAN make it work, please provide a skeleton of the script where the label is visible and the goto statement is visible :)
what does 'does not work' mean? What have you tried so far? It's straight forward, I think.
#!/bin/csh
label: printf "foo" sleep 1 goto label
Regards hmw _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org
Runs on my box (x86_64, with tcsh-6.20.00-5.fc26)
Kind regards
Joachim Backes
On 08/21/2017 02:02 AM, Joachim Backes wrote:
On 08/21/17 09:16, Michael Welle wrote:
Hallo,
JD jd1008@gmail.com writes:
The manpage for the fedora csh describes the usage of goto, but it does not work. Anyone with insight on this?
If you CAN make it work, please provide a skeleton of the script where the label is visible and the goto statement is visible :)
what does 'does not work' mean? What have you tried so far? It's straight forward, I think.
#!/bin/csh
label: printf "foo" sleep 1 goto label
Regards hmw _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org
Runs on my box (x86_64, with tcsh-6.20.00-5.fc26)
Kind regards
Joachim Backes
Hi Joachim
I ran your the script used by Michael Welle, but changes #!/bin/csh to #!/bin/tcsh
and it displayes the same problem:
Cat /tmp/test-csh-goto #/bin/tcsh label: printf "foo" sleep 1 goto label
$ /tmp/test-csh-goto foo /tmp/test-csh-goto[6]: goto: not found [No such file or directory]
On 08/22/2017 05:36 AM, JD wrote:
Cat /tmp/test-csh-goto #/bin/tcsh label: printf "foo" sleep 1 goto label
$ /tmp/test-csh-goto foo /tmp/test-csh-goto[6]: goto: not found [No such file or directory]
Is that what is actually in your file? ! seems to be missing.
You may want to try with a first line of
#!/bin/csh -f
It is obviously an issue with either your system or your user account. Try another user.
On 08/21/2017 03:52 PM, Ed Greshko wrote:
On 08/22/2017 05:36 AM, JD wrote:
Cat /tmp/test-csh-goto #/bin/tcsh label: printf "foo" sleep 1 goto label
$ /tmp/test-csh-goto foo /tmp/test-csh-goto[6]: goto: not found [No such file or directory]
Is that what is actually in your file? ! seems to be missing.
You may want to try with a first line of
#!/bin/csh -f
It is obviously an issue with either your system or your user account. Try another user.
I already replied to Gordon that I am updating to current version.
Hello,
just a short addition to my previous post.
JD jd1008@gmail.com writes:
I ran your the script used by Michael Welle, but changes #!/bin/csh to #!/bin/tcsh
and it displayes the same problem:
Cat /tmp/test-csh-goto #/bin/tcsh
^^^^^^^^^^^^ this wrong shebang line gives you...
label: printf "foo" sleep 1 goto label
$ /tmp/test-csh-goto foo /tmp/test-csh-goto[6]: goto: not found [No such file or directory]
...this error message if you current shell is ksh for instance.
Regards hmw
On 08/22/2017 05:27 PM, Michael Welle wrote:
Hello,
just a short addition to my previous post.
JD jd1008@gmail.com writes:
I ran your the script used by Michael Welle, but changes #!/bin/csh to #!/bin/tcsh
and it displayes the same problem:
Cat /tmp/test-csh-goto #/bin/tcsh
^^^^^^^^^^^^ this wrong shebang line gives you...
label: printf "foo" sleep 1 goto label
$ /tmp/test-csh-goto foo /tmp/test-csh-goto[6]: goto: not found [No such file or directory]
...this error message if you current shell is ksh for instance.
I already told him the ! was missing from his file.....and he seems to have ignored that. Hope he listens better a second time.
And, I confirmed that is the error you get with ksh as your running shell. With sh (bash) as your running shell you get a different message when you forget the !.
[egreshko@meimei tmp]$ ./test-csh-goto ./test-csh-goto: line 2: label:: command not found foo./test-csh-goto: line 5: goto: command not found
Good catch with ksh. I'd forgotten about that shell. :-)
On 08/22/2017 03:27 AM, Michael Welle wrote:
Hello,
just a short addition to my previous post.
JD jd1008@gmail.com writes:
I ran your the script used by Michael Welle, but changes #!/bin/csh to #!/bin/tcsh
and it displayes the same problem:
Cat /tmp/test-csh-goto #/bin/tcsh
^^^^^^^^^^^^ this wrong shebang line gives you...
label: printf "foo" sleep 1 goto label
$ /tmp/test-csh-goto foo /tmp/test-csh-goto[6]: goto: not found [No such file or directory]
...this error message if you current shell is ksh for instance.
Regards hmw _______
Bingo. THAT was my oversight.
On 08/21/2017 01:16 AM, Michael Welle wrote:
Hallo,
JD jd1008@gmail.com writes:
The manpage for the fedora csh describes the usage of goto, but it does not work. Anyone with insight on this?
If you CAN make it work, please provide a skeleton of the script where the label is visible and the goto statement is visible :)
what does 'does not work' mean? What have you tried so far? It's straight forward, I think.
#!/bin/csh
label: printf "foo" sleep 1 goto label
Regards hmw
This is what "Does Not Work" mean: Running your example: $ /tmp/test-csh-goto foo /tmp/test-csh-goto[21]: goto: not found [No such file or directory]
On Mon, 2017-08-21 at 15:30 -0600, JD wrote:
On 08/21/2017 01:16 AM, Michael Welle wrote:
Hallo,
JD jd1008@gmail.com writes:
The manpage for the fedora csh describes the usage of goto, but it does not work. Anyone with insight on this?
If you CAN make it work, please provide a skeleton of the script where the label is visible and the goto statement is visible :)
what does 'does not work' mean? What have you tried so far? It's straight forward, I think.
#!/bin/csh
label: printf "foo" sleep 1 goto label
Regards hmw
This is what "Does Not Work" mean: Running your example: $ /tmp/test-csh-goto foo /tmp/test-csh-goto[21]: goto: not found [No such file or directory]
What does "which goto" say?
poc
On 08/21/2017 03:50 PM, Patrick O'Callaghan wrote:
On Mon, 2017-08-21 at 15:30 -0600, JD wrote:
On 08/21/2017 01:16 AM, Michael Welle wrote:
Hallo,
JD jd1008@gmail.com writes:
The manpage for the fedora csh describes the usage of goto, but it does not work. Anyone with insight on this?
If you CAN make it work, please provide a skeleton of the script where the label is visible and the goto statement is visible :)
what does 'does not work' mean? What have you tried so far? It's straight forward, I think.
#!/bin/csh
label: printf "foo" sleep 1 goto label
Regards hmw
This is what "Does Not Work" mean: Running your example: $ /tmp/test-csh-goto foo /tmp/test-csh-goto[21]: goto: not found [No such file or directory]
What does "which goto" say?
poc
Dude!!!! goto is a built-in!!!!!
On 08/21/2017 03:09 PM, JD wrote:
What does "which goto" say?
Dude!!!! goto is a built-in!!!!!
Yes, it should be, but the question is still valid. You *should* get this response:
$ which goto goto: shell built-in command.
If that's not the response you get, the result might be informative.
You seem to be scolding/yelling at Patrick, which would be rude. Just a tip: we're all here to help each other, and we should all make an effort to be pleasant.
On 08/22/2017 07:36 AM, Gordon Messmer wrote:
Yes, it should be, but the question is still valid. You *should* get this response:
$ which goto goto: shell built-in command.
If that's not the response you get, the result might be informative.
FWIW, you only get that result if the shell you are running is csh.
egreshko@meimei ~]$ echo $0 /bin/bash
[egreshko@meimei ~]$ which goto /usr/bin/which: no goto in (/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/home/egreshko/bin)
[egreshko@meimei ~]$ csh [egreshko@meimei ~]$ echo $0 csh
[egreshko@meimei ~]$ which goto goto: shell built-in command.
You seem to be scolding/yelling at Patrick, which would be rude. Just a tip: we're all here to help each other, and we should all make an effort to be pleasant.
+1
Hello,
JD jd1008@gmail.com writes:
On 08/21/2017 01:16 AM, Michael Welle wrote:
Hallo,
JD jd1008@gmail.com writes:
The manpage for the fedora csh describes the usage of goto, but it does not work. Anyone with insight on this?
If you CAN make it work, please provide a skeleton of the script where the label is visible and the goto statement is visible :)
what does 'does not work' mean? What have you tried so far? It's straight forward, I think.
#!/bin/csh
label: printf "foo" sleep 1 goto label
Regards hmw
This is what "Does Not Work" mean: Running your example: $ /tmp/test-csh-goto foo
well, you seem to be an experienced user, so I might be wrong and I apologize in advance. This error message:
/tmp/test-csh-goto[21]: goto: not found [No such file or directory]
it looks like an error message thrown by ksh and not by csh. So if you had run my script with the shebang line #!/bin/csh you might want to check if /bin/csh is really a csh on your system.
Good luck hmw