Stty: : No such device or address


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Stty: : No such device or address
# 15  
Old 08-07-2013
alike other script in the same directory, i am using this
Quote:
#!/bin/csh
in the begining of my script. what else do i need to do to get profile file working properly?
# 16  
Old 08-07-2013
You haven't shown us your entire script. Of the six lines you did show, one was Bourne shell, and you seem to have wrongly deduced that the error is somewhere it is not.

I haven't used C-Shell in the best part of 20 years - and for good reason - it's rubbish, really rubbish! Just because "other scripts" in the directory uses it doesn't mean you have to!

Please post your entire script so we can see the big picture instead of doing this piecemeal.
# 17  
Old 08-07-2013
here is the entire script:

Code:
#!/bin/csh

# ***  Lovely Sethi 08/2013  ***
#  This process executes the BRAVO_MAIN_REFRESH.sql
#
#  This file should be scheduled in CRONTAB to run each Big run.

stty erase ^H 2>/dev/null

`sqlplus -s $ORACLE_USER/$ORACLE_PASS@$ORACLE_SID   << EOF > sql_output.txt
                select count(*) from bravo_statistics
                where trunc(time_stamp)=trunc(sysdate)
                and description in ('BEGIN NIT','END MR');
EOF`
big_cnt=`sed -n '4p' sql_output.txt`
#big_cnt=$(sed -n '4p' sql_output.txt)

if [ $big_cnt -eq 0 ] ; then

`sqlplus -s $ORACLE_USER/$ORACLE_PASS@$ORACLE_SID   << EOF >> sql_output.txt
                select nvl(description,'0') from bravo_statistics
                where trunc(time_stamp)=trunc(sysdate)
                and description='END CAT';
EOF`
`sqlplus -s $ORACLE_USER/$ORACLE_PASS@$ORACLE_SID   << EOF >> sql_output.txt
                select count(*) from mrs.bill_cal
                where trunc(actual_run_date)=trunc(sysdate)-19;
EOF`
end_ct=`sed -n '9p' sql_output.txt`
#end_ct=$(sed -n '9p' sql_output.txt)
emtr_cnt=`sed -n '14p' sql_output.txt`
#emtr_cnt=$(sed -n '14p' sql_output.txt)
if [ "$end_ct" = "END CAT" ] && [ $emtr_cnt -eq 1 ] ;  then
sqlplus $ORACLE_USER/$ORACLE_PASS@$ORACLE_SID @/uv1402/u207/home/bravodba/bestdbscript/sqlscriptfiles/BRAVO_MAIN_REFRESH.sql
/uv1402/u207/home/bravodba/bestdbscript/shscriptfiles/sendmailanalysisrefresh.sh
echo "value found"
fi

fi


Last edited by lovelysethii; 08-07-2013 at 10:53 AM..
# 18  
Old 08-07-2013
Now it's Bash??

Are the Oracle variables set up in the ~/.bash_profile?

Code:
$ cat scr1
#!/bin/bash

# ***  Lovely Sethi 08/2013  ***
#  This process executes the BRAVO_MAIN_REFRESH.sql
#
#  This file should be scheduled in CRONTAB to run each Big run.

. ~/.bash_profile 2> /dev/null >&2

sqlplus -s $ORACLE_USER/$ORACLE_PASS@$ORACLE_SID   << EOF > sql_output.txt
                select count(*) from bravo_statistics
                where trunc(time_stamp)=trunc(sysdate)
                and description in ('BEGIN NIT','END MR');
EOF
big_cnt=$(sed -n '4p' sql_output.txt)

if [ $big_cnt -eq 0 ] ; then

  sqlplus -s $ORACLE_USER/$ORACLE_PASS@$ORACLE_SID   << EOF >> sql_output.txt
                select nvl(description,'0') from bravo_statistics
                where trunc(time_stamp)=trunc(sysdate)
                and description='END CAT';
EOF

  sqlplus -s $ORACLE_USER/$ORACLE_PASS@$ORACLE_SID   << EOF >> sql_output.txt
                select count(*) from mrs.bill_cal
                where trunc(actual_run_date)=trunc(sysdate)-19;
EOF

  end_ct=$(sed -n '9p' sql_output.txt)
  emtr_cnt=$(sed -n '14p' sql_output.txt)

  if [ "$end_ct" = "END CAT" ] && [ $emtr_cnt -eq 1 ];  then
    sqlplus $ORACLE_USER/$ORACLE_PASS@$ORACLE_SID @/uv1402/u207/home/bravodba/bestdbscript/sqlscriptfiles/BRAVO_MAIN_REFRESH.sql
    /uv1402/u207/home/bravodba/bestdbscript/shscriptfiles/sendmailanalysisrefresh.sh
    echo "value found"
  fi
fi

$ bash -n scr1
(no output - syntax is valid)

# 19  
Old 08-07-2013
I see you swiftly edited your post to change
Code:
#!/bin/bash

to
Code:
#!/bin/csh

.

Which is it???

The script you posted is Bourne shell-like NOT C-shell.
# 20  
Old 08-07-2013
ahh!! i was doing some experiment. actually it is csh
# 21  
Old 08-07-2013
No. It's Bourne shell. There is nothing C-shell about the script you posted.

This is a waste of time.

Thread closed.
This User Gave Thanks to Scott For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. HP-UX

Failed to open tape device /dev/rmt/0mn:Device busy (errno = 16)

Hi, Unable to make tape backup, please help. /opt/ignite/bin/make_tape_recovery -a /dev/rmt/?mn -I -v -m tar -x inc_entire=vg00 * Creating local directories for configuration files and archive. ======= 04/25/16 16:28:08 IST Started /opt/ignite/bin/make_tape_recovery. (Mon... (4 Replies)
Discussion started by: anuragr
4 Replies

2. Debian

Problem configuring IP address on remote device

I need to add a printer with Ethernet to my local network. The default IP address in the printer is 0.0.0.0 and I need to change it to a 192.168.0.x address. I have previously temporarily changed the IP address of a computer (with ifconfig) to an address similar to the new device and changed the... (8 Replies)
Discussion started by: snorkack59
8 Replies

3. Red Hat

Unable To Activate Ethernet Network Device in RHEL 5.5 - e100 device eth0 does not seem to be presen

Hi All, Could anyone please help to resolve the below problem. I installed RHEL5.5 in my desktop.But when i try to activate the ethernet connection then it gives me the error. I spent 2 days for the above and go through with several suggestion found by googling. But no luck. ... (0 Replies)
Discussion started by: Tanmoy
0 Replies

4. Solaris

sar : insufficient address space to load xxxx device records

Hello, i am using Solaris 10, The sar running in my system might be corrupted, but not sure why as there has been no updates to it ( to the best of my knowledge) and it was working fine until few days back. If i try to get sar reports using sar -o <filename> 60 180 there is no error but the... (2 Replies)
Discussion started by: nimi20
2 Replies

5. UNIX for Dummies Questions & Answers

Device Probe freezes after detecting Ethernet address while installing FreeeBSD 7.0

I'm trying to install FreeBSD 7.0 from CDs I made a few months ago on a brand new system with parts I just got in from NewEgg. I select the default option from the Boot Loader and it goes into the device probe. Several devices are recognized, but then it freezes at: mskc0: <Marvell Yukon... (2 Replies)
Discussion started by: ideogon
2 Replies

6. UNIX for Dummies Questions & Answers

"/dev/rmt/0: No such device or address" when using mt command

/dev/rmt/0: No such device or address I get this when I do a "mt -f /dev/rmt/0 rewind" This is on a Solaris 7 system. I tried devfsadm -c tape and drvconfig ; tape and both didn't work. Help please....... :confused: (4 Replies)
Discussion started by: shorty
4 Replies

7. Shell Programming and Scripting

stty: : No such device or address

I encoutered the error "stty: : No such device or address" in the korn shell script log. I added STTY EARSE ^H in profile. why iam i getting that error in Korn shell Thanks nandinisagar (6 Replies)
Discussion started by: nandinisagar
6 Replies
Login or Register to Ask a Question