10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I am getting below error message while executing memory utilization script.
$ ./mem1.sh
syntax error on line 1, teletype
syntax error on line 1, teletype
$
$ uname -a
SunOS 5.9 XXX Generic_122300-60 sun4u sparc SUNW,Sun-Fire-V440
$
But i can execute same script in... (3 Replies)
Discussion started by: susindram
3 Replies
2. Shell Programming and Scripting
Hi All,
I'm writing a shell script in KSH, where I want to store the filename, total record count and actual record count of all the source files. The source files reside in 4 different sub-folders under the same root folder.
Below is code:
#!/usr/bin/ksh... (6 Replies)
Discussion started by: jagari
6 Replies
3. Shell Programming and Scripting
Hi all,
i am facing the error "expr: non-numeric argument" when i use the expr command.
Following is the expression which i want to execute
HR=$(echo `date +%H`)
MIN=$(echo `date +%M`)
TOT_MIN=`expr "$HR" \* 60+$MIN` | bc
echo $TOT_MIN
Here I am being reported with the error expr:... (6 Replies)
Discussion started by: sparks
6 Replies
4. UNIX for Dummies Questions & Answers
Hi All,
This is a piece of code from one of my scripts:
t1=`cat temp3.21447 | grep WEALTHTOUC_TRANS_20100409_233127.txt.txt.TRG | awk '{print $3}' | cut -c1-5`
t2=`cat temp3.21447 | grep WEALTHTOUC_TRANS_20100409_233127.txt.txt.TRG | awk '{print $5}' | cut -c1-5`
#t1=23:43... (5 Replies)
Discussion started by: prachiagra
5 Replies
5. UNIX for Dummies Questions & Answers
hello to everyone,
i am writing a shell script in unix and i use the following command:
lnum= cut -f 1 -d : aa
passline=`expr $lnum + 1`
echo "$passline"
with the following command i get the value that is stored in the first field of the file "aa" and i save it in the variable "lnum". i am... (2 Replies)
Discussion started by: omonoiatis9
2 Replies
6. Shell Programming and Scripting
I am running AIX 5.3 using the Korn Shell. I am reading file names from a file, as an example:
E0801260
E0824349
E0925345
EMPMSTR
statement "num=$(expr substr "$DDNAME" 4 2)
extracts the numeric values fine. But when I het the last entry, it returns num=MS, but I get an error... (19 Replies)
Discussion started by: kafkaf55
19 Replies
7. UNIX for Dummies Questions & Answers
hi there,
I was recently introduced to this site by a friend. I hope you guys can help with a code error i can't seem to debug.I can get to add two different data types together. A snippet of the code is below:
echo -n "Enter Your MOnthly Investment"
read Inv
PIP= $(echo "scale=2; 10 / 100"... (4 Replies)
Discussion started by: Allenzo
4 Replies
8. UNIX for Advanced & Expert Users
Hi All,
when i executing scripts i got error like:
syntax error on line 1, teletype
expr: syntax error
expr: syntax error
expr: syntax error
Please advise to me.
Note: Yesterday it's working fine, 2day only i got error. (2 Replies)
Discussion started by: koti_rama
2 Replies
9. Shell Programming and Scripting
i want to get a substring from a string and used such shell script:
var_year=`expr substr "07132006" 5 4`
echo $var_year
but i got such error message: expr: syntax error. why?
Note: Kshell used on solaris 8. :confused: (5 Replies)
Discussion started by: robin.zhu
5 Replies
10. Shell Programming and Scripting
Hi There,
I have a cron script that returns the error:
syntax error on line 1, teletype
Has any one seen this, know what it is, or know's how to get rid of it?
Thanks,
Jeremy. (1 Reply)
Discussion started by: KokoPops
1 Replies