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.
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.
Hi,
I'm trying to use the goto in ksh but it does not appear to be a valid command. Is that only valid in csh? Anything similar in ksh that I can use?
Appreciate any help you can provide.
Thanks.
geraldine (4 Replies)
Hey Guys.. I just want to know how to use Goto statement in shell scripts.
I know the basic use of statement.
Goto Label
The above statement will search for some label which must be defined in the script itself as:
label:
I tried these combinations but I didn't work out for me and I'm... (7 Replies)
I have a test script for using goto statement but its not working. please help
i tried both in linux and hp-ux it's not working please help
#! /bin/ksh
t=`ps -ef|grep ti.sh|grep -v grep`
if ; then
goto start
else
goto stop
fi
start:
echo "start"
stop:
echo "stop" (5 Replies)
Dear All,
Can any one pls let me the command for how to goback to previous visited directory from the current working directory in SunOS ?
In case of HP-UX; the same can be resolved through "cd -" command.
Thanks in advance!
Prasanth Babu. (6 Replies)
Hello all,
I am in a terminal on Solaris and something weird is happening...
When I am typing I can't see what I am typing, although what I am typing is working. As is if I type the command and hit enter, the command runs.
Anyone have a clue why or how I can make it display my typing?
Is... (2 Replies)
Im trying to do something like this but I cant find any documentation.
read X
if
then goto ThisLine
fi
OTHER CODE
OTHER CODE
Label: ThisLine echo "You entered 1" (5 Replies)
Hi
As a dummy my question is very simple. When typing cw I've read (many times) that a '$' should appear at the end of the word I'm about to change. However, it doesn't, and in my case the word is instantly deleted and so ready to be changed!
Can somebody tell me why this is, or maybe I... (4 Replies)
H,
I
I have this below script for removing the full path from a string which is indeed a filepath location if windows.
It converts input
\abc\asssh\abc
To
abc
But if filename has 0 like:
\abc\abc\00000Hgg
Then its typing
abc00000Hgg
PLEASE note that its solaris.
Script is:
more... (10 Replies)
#!/bin/sh
label:
echo sql poll
v=`sqlplus -s <<!
HR/HR
set pages 0 echo off feed off
select distinct status from
emp
where
id=5;
!
`
echo $v;
echo it comes here after false
if
then
echo if condition true
sqlplus -l scott/tiger <<EOF
select * from department;
EXIT (2 Replies)
Well, guys I saw a question about GOTO for Python.
So this gave me the inspiration to attempt a GOTO function for 'dash', (bash and ksh too).
Machine: MBP OSX 10.14.3, default bash terminal, calling '#!/usr/local/bin/dash'...
This is purely a fun project to see if it is possible in PURE... (3 Replies)
Discussion started by: wisecracker
3 Replies
LEARN ABOUT MINIX
tget
TGET(1) General Commands Manual TGET(1)NAME
tget - get termcap values
SYNOPSIS
tget [-flag id] [-num id] [-str id] [-goto col line] [[-echo] string]
DESCRIPTION
Tget allows shell scripts access to the termcap(3) functions. Flags, numbers and strings can be queried from the termcap database under
the entry denoted by the environment variable $TERM.
OPTIONS -flag id
Set the exit status to zero if the flag id is set. All other options except -echo set the exit status to id being available or not.
The last option sets the final exit code.
-num id
Print the value of the numeric variable id.
-str id
Print the value of the string variable id.
-goto col line
Generates instructions to go to the given column and line if the cm capability exists.
-echo string
Prints string. Any other argument that does not start with a dash is also printed.
EXAMPLE
Try this: tget -str so 'Reverse Video' -str se
ENVIRONMENT
TERM Terminal type.
TERMCAP Path to the termcap database, by default /etc/termcap:/usr/etc/termcap.
SEE ALSO termcap(3).
DIAGNOSTICS
Tget will fail immediately with a descriptive message if the termcap entry can't be found.
AUTHOR
Kees J. Bot (kjb@cs.vu.nl)
TGET(1)