---------- Post updated at 02:24 PM ---------- Previous update was at 01:59 PM ----------
@Scrutinizer, I realise you are right, SAP is using sh /dir/dir/xxx.sh to run the script
Another question, does "set -x" work in Linux?
I have another 500++ lines of script and thats also giving me the same error, tho this time I used sh /dir/dir/script.sh to run it and its calling #!/usr/bin/sh
Ill paste whats in lines stated in the error message:
I am suppose to get a file produced out of this, a printer list.txt which of course isn't generated
Hi all,
Im using a script which contains read command.. the script works perfectly but when I alias the script it gave "undifined variable" after I enter the read command input (variable)...
Does any one know why ? (4 Replies)
Can someone tell me why I'm getting error when I try to run this?
#!/bin/csh -f
source ~/.cshrc
#
set SQLPLUS = ${ORACLE_HOME}/bin/sqlplus
#
set count=`$SQLPLUS -s ${DB_LOGIN} << END
select count(1) from put_groups where group_name='PC' and description='EOD_EVENT' and serial_number=1;... (7 Replies)
Hello,
I have a csh script that creates an environment variable. I want to pass the environment variable(CURR_TABLE_DATE) to an Informix sql script. Here is the csh:
#!/bin/csh -f
setenv INFORMIXSERVER market3_tcp
setenv CURR_TABLE_DATE 20090714
set DATABASE = gm_cdr
set SQL_DIR =... (0 Replies)
Hello,
#this script renames schematic file for model year change
#my = model year prefix
my="lsd"
for i in 'ls lsb*'
do
old=$i
new='echo $i | cut - c4 - c30'
mv $i $my$new
end
i: Undefined variable
What am I missing or doing wrong? (6 Replies)
Below script cuts date part from the date entered by the user.
#!/bin/csh
echo 'Enter date in the format dd/mm/yyyy'
read DATE
DD=`echo $DATE | cut -c1-2`
echo $DD;
when debug with -x option , it works perfectly but without -x doesnot.:confused:
$ sh -x unix_12.sh
+ echo Enter... (2 Replies)
Hello group,
Still fairly new at the whole scripting thing so be gentle. I'm trying to write a simple script that archives my log files into a master log broken into weeks of the year.
My script runs fine up till the "cat" lines which I get a undefined or illegal variable name error. But... (2 Replies)
Hi,
i am a beginner in ubuntu. my default shell is bash. everytime i try to change the shell with command "csh", i get a message (probably an error message). after i get into c-shell, when i try to execute a c shellscript, then it showed the same message. any idea about what is this about or any... (1 Reply)
I am getting the error undefined variable even after following these steps
#read name
abcd
#echo $name
na: undefined variable (6 Replies)
Discussion started by: Vishawdeep
6 Replies
LEARN ABOUT REDHAT
script
SCRIPT(1) BSD General Commands Manual SCRIPT(1)NAME
script -- make typescript of terminal session
SYNOPSIS
script [-a] [-f] [-q] [-t] [file]
DESCRIPTION
Script makes a typescript of everything printed on your terminal. It is useful for students who need a hardcopy record of an interactive
session as proof of an assignment, as the typescript file can be printed out later with lpr(1).
If the argument file is given, script saves all dialogue in file. If no file name is given, the typescript is saved in the file typescript.
Options:
-a Append the output to file or typescript, retaining the prior contents.
-f Flush output after each write. This is nice for telecooperation: One person does `mkfifo foo; script -f foo' and another can super-
vise real-time what is being done using `cat foo'.
-q Be quiet.
-t Output timeing data to standard error. This data contains two fields, separated by a space. The first field indicates how much time
elapsed since the previous output. The second field indicates how many characters were output this time. This information can be used
to replay typescripts with realistic typing and output delays.
The script ends when the forked shell exits (a control-D to exit the Bourne shell (sh(1)), and exit, logout or control-d (if ignoreeof is not
set) for the C-shell, csh(1)).
Certain interactive commands, such as vi(1), create garbage in the typescript file. Script works best with commands that do not manipulate
the screen, the results are meant to emulate a hardcopy terminal.
ENVIRONMENT
The following environment variable is utilized by script:
SHELL If the variable SHELL exists, the shell forked by script will be that shell. If SHELL is not set, the Bourne shell is assumed. (Most
shells set this variable automatically).
SEE ALSO csh(1) (for the history mechanism), replay(1).
HISTORY
The script command appeared in 3.0BSD.
BUGS
Script places everything in the log file, including linefeeds and backspaces. This is not what the naive user expects.
Linux July 30, 2000 Linux