Sponsored Content
Full Discussion: urgent: script problem???
Top Forums Shell Programming and Scripting urgent: script problem??? Post 302126554 by skyineyes on Thursday 12th of July 2007 02:45:04 AM
Old 07-12-2007
urgent: script problem???

#!/usr/bin/sh
read file
#exec 3<&0
exec 0<$file
while read line
do
if [ $count -eq 4 ]
then
BOUND=$line
break
fi
count=`expr $count + 1`
done
#exec 0<&3
echo $BOUND



sh check.sh

myfile.txt


after runing the script i am getting following error messages
check.sh[7]: test: 0403-004 Specify a parameter with this command.
expr: 0402-050 Syntax error.
check.sh[7]: test: 0403-004 Specify a parameter with this command.
expr: 0402-050 Syntax error.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Urgent problem with wtmpx

Hi everybody I have a problem with wtmpx. Accounting file. I activated it. It works but to well :( Writes the same message every minute. "faxmodem" As you can see it does not take to long until my /var file is soon full. Thanks Peter (26 Replies)
Discussion started by: Peterh
26 Replies

2. UNIX for Dummies Questions & Answers

help urgent problem

i accedently "deleted" all workspaces I have a black screen and dont know what to do solaris common desktop enviroment (1 Reply)
Discussion started by: ssshakir
1 Replies

3. Solaris

Another Urgent HDD problem

I have another Hdd problem with Ultra 1 machine the hdd is segate (+-)17560 MB and when I start installtion of sun solaries 2.6 the system sees the hdd correctly, and the installtion goes fine with partioning the disk as follows / 150 MB swap 500 MB /user 1000 MB /user1 100MB /usr3 5500 MB... (4 Replies)
Discussion started by: adol3
4 Replies

4. HP-UX

Urgent printing problem

I can no longer print from HP-UX 10. All the printers are network printers. I have already stopped and restarted the spooler (lpshut and lpsched), but still the same problem. The printers react when I ping them. I have also tried with SAM, but the system cannot find the printers. Can somebody... (1 Reply)
Discussion started by: filipd
1 Replies

5. Shell Programming and Scripting

date problem -- URGENT

Hi All, When i run date command at unix prompt, i get the output in format Tue Aug 29 12:36:18 GMT 2006 when i write the shell script i should be able to export the date output with format as YYYY/MM/DD-HH:MM:SS into some variable(ex : dateop). and when i say echo ${dateop} i should... (9 Replies)
Discussion started by: rkrgarlapati
9 Replies

6. Shell Programming and Scripting

Getting Following problem when opening shell script (Very Urgent)

Hi All, Actually when i am trying to open my shell script file 1.sh then i am getting the following error. > vi 1.sh "/var/tmp/ExdNaarK" No space left on device Can anybody tell me that how to rectify it. It is very urgent. Because i am not able to do any work due to the above error. ... (1 Reply)
Discussion started by: sunitachoudhury
1 Replies

7. UNIX for Advanced & Expert Users

A problem in autosys-- very urgent

Hi , I have 5 jobs in autosys which are dependant on one another oen by one.say job1,job2.. job5. job 1 is a filewatcher.job2 to job5 are command jobs.First the filewatcher starts as when a file which it is looking for arrives.based on this job rest of the sequence starts.after the job5 is... (0 Replies)
Discussion started by: mohanpadamata
0 Replies

8. Shell Programming and Scripting

urgent lprm problem

hi all i have printer call prt1 we send to this printer some job and then we want to cancel it. we did lpstat no job id found so i did lprm and it wrote to me No active jobs on prt3!(which i don't have this kind of printer) then i wrote lprm prt1 lprm: No active jobs on prt1! ... (0 Replies)
Discussion started by: naamas03
0 Replies

9. Shell Programming and Scripting

Script Performance problem . urgent frnds

HI frnds I have one flat with data and am loading the data into oracle table. While loading , rejected records are captured in log file. Now I want to read the log file and get the all rejected records and the reason for the rejection. I developed the script . its finding 5000 rejected... (7 Replies)
Discussion started by: Gopal_Engg
7 Replies

10. Shell Programming and Scripting

URGENT Reading a file and assessing the syntax shell script URGENT

I am trying to write a shell script which takes an input file as an arguement in the terminal e.g. bash shellscriptname.sh input.txt. I would like for the file to be read line by line each time checking if the .txt file contains certain words or letters(validating the syntax). If the line being... (1 Reply)
Discussion started by: Gurdza32
1 Replies
shells(4)							   File Formats 							 shells(4)

NAME
shells - shell database SYNOPSIS
/etc/shells DESCRIPTION
The shells file contains a list of the shells on the system. Applications use this file to determine whether a shell is valid. See getuser- shell(3C). For each shell a single line should be present, consisting of the shell's path, relative to root. A hash mark (#) indicates the beginning of a comment; subsequent characters up to the end of the line are not interpreted by the routines which search the file. Blank lines are also ignored. The following default shells are used by utilities: /bin/bash, /bin/csh, /bin/jsh, /bin/ksh, /bin/ksh93, /bin/pfcsh, /bin/pfksh, /bin/pfsh, /bin/sh, /bin/tcsh, /bin/zsh, /sbin/jsh, /sbin/sh, /usr/bin/bash, /usr/bin/csh, /usr/bin/jsh, /usr/bin/ksh, /usr/bin/ksh93, /usr/bin/pfcsh, /usr/bin/pfksh, /usr/bin/pfsh, and /usr/bin/sh, /usr/bin/tcsh, /usr/bin/zsh, and /usr/sfw/bin/zsh. /etc/shells overrides the default list. Invalid shells in /etc/shells could cause unexpected behavior, such as being unable to log in by way of ftp(1). FILES
/etc/shells list of shells on system SEE ALSO
vipw(1B), ftpd(1M), sendmail(1M), getusershell(3C), aliases(4) SunOS 5.11 20 Nov 2007 shells(4)
All times are GMT -4. The time now is 07:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy