The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Hiding Passwords while typing.. rrs UNIX for Advanced & Expert Users 1 07-28-2007 12:50 AM
Different in typing command and using shell script Draculla Shell Programming and Scripting 2 07-28-2006 04:25 AM
tab instead of typing in ksh Jane@ist UNIX for Dummies Questions & Answers 2 02-01-2006 05:54 PM
hide password typing ivancheung High Level Programming 2 09-30-2004 01:05 PM
how to goto in ksh Geraldine Shell Programming and Scripting 4 03-12-2004 08:35 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-20-2007
rairey rairey is offline
Registered User
  
 

Join Date: Sep 2007
Posts: 2
Cool Stuck after typing goto

uname -a returns: SMP Tue May 17 17:52:23 EDT 2005 i686 athlon i386 GNU/Linux

I have many aliases beginning with "goto" so...
if I type goto and then hit return (oops)

A goto prompt pops up and I cant exit from it(I tried MANY key seqs)
The only way to exit is to kill the term window and launch another.

Anybody know how to exit from the goto prompt ??

Thanks
Ron
  #2 (permalink)  
Old 09-20-2007
rairey rairey is offline
Registered User
  
 

Join Date: Sep 2007
Posts: 2
update

I dont type goto then hit return.

I type goto bla, then it gets stuck in the goto prompt.

bla could be anything, the point is, the typo is the space.
for example, if I have an alias "gotohome", I might type be accident
"goto home" and then I'm stuck.

just wanted to be clear...
  #3 (permalink)  
Old 09-20-2007
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
Wow! I have never encountered this before! Yet another reason to avoid csh. You must be using csh or tcsh as your shell. If you would switch to bash, you would not have this problem. But when csh sees an input line like "goto fubar", it will actually skip all further input lines until it encounters a line labeled "fubar". You can supply such an input line the first time. After that, another "goto fubar" sends it back to where it encountered the line labeled "fubar". Nice design...not.

Code:
$ csh
%echo $shell
/bin/tcsh
%goto fubar
goto? hello
goto? echo $shell
goto? fubar:
%date ; sleep 2
Thu Sep 20 13:06:49 EDT 2007
%
%
%
%echo we are gonna loop
we are gonna loop
%goto fubar
Thu Sep 20 13:07:16 EDT 2007
we are gonna loop
Thu Sep 20 13:07:18 EDT 2007
we are gonna loop
Thu Sep 20 13:07:20 EDT 2007
we are gonna loop
Thu Sep 20 13:07:22 EDT 2007
we are gonna loop
Thu Sep 20 13:07:24 EDT 2007
we are gonna loop
Thu Sep 20 13:07:26 EDT 2007
we are gonna loop
I'm guessing that the "fubar:" line needs to be in the history list in order to loop, but I don't feel like testing that.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:01 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0