trouble executing and running on BSD from DG


 
Thread Tools Search this Thread
Operating Systems BSD trouble executing and running on BSD from DG
# 1  
Old 12-02-2005
trouble executing and running on BSD from DG

Hi,

I recently installed FreeBSD 6.0, and am now trying to run my newly created sh scripts, that I ftp'd over from my works Data General - Unix server, I thought they would at least sumwhat/part run, but I can'y even get my basic menu to run and don't know why, can anyone help me by throwing some light on this issue,

I can't even get a script to execute, after changing the scripts to (rwx) on all
of them

menu script below

#!/bin/sh

echo "\n\t\t\t" ;
date '+DATE: %d/%m/%y%nTIME: %H:%M:%S'
sleep 3
clear
echo "\t1. RUN BOARDERS SCRIPT(DAILY)"
echo "\t2. RUN WEEKLY SCRIPT (FRIDAYS @ 2:10 pm)"
echo "\t3. RUN WEEKLY PAIN SCRIPT (WEDNESDAYS)"
echo "\t4. RUN SYSTEMWATCH ROUTINE (Monthly)......."
echo "\t5. RUN I S D SCRIPT......."
echo "\t6. ......."
echo "\t7. ( S U B - M E N U )-Manipulate files"
echo "\t8. RUN Part 1 - Inpatients......."
echo "\t9. RUN Part 2 - Day Bed Units...."
echo "\t10. .........."
echo "\t11. ......."
echo "\t12. RUN 31Days Script......."
echo "\t13. ......."
echo "\t14. ......."
echo "\t15. ......."
echo "\t16. ......."
echo "\t17. ......."
echo "\t18. .transfer back the waiting REPORT......"
echo "\n\t EXIT FROM THIS PROGRAM.. Q or q"
echo "\n\t OR Select a number from the Menu ! \c"
read retry
if [ $retry = 1 ]
then
clear
echo "\n\n\n\t\t\t NOW RUNNING SCRIPT "
echo "\n\n"
/u1/excel/ftp_boarders
cd /u1/excel/Kenny/boarders
/u1/excel/Kenny/boarders/boarders
ls -l /u1/excel/Kenny/boarders/Output
echo "\n\n\t"
#cat /u1/excel/Kenny/boarders/Output |pg
/u1/excel/ftp_boardback
/u1/excel/ELLAMENU
exit 0
fi
if [ $retry = 2 ]
then
cd /u1/excel
clear
/u1/excel/ftp_waiting
echo "\n\n\t. .RUNNING WEEKLY INPATIENT SCRIPT......"
/u1/excel/Iptestger
cd /u1/excel
/u1/excel/ftp_waitback
/u1/excel/ELLAMENU
exit 0
fi
if [ $retry = 3 ]
then
/u1/excel/ftp_chest
cd /u1/excel/Kenny
/u1/excel/Kenny/ChestPain
/u1/excel/ftp_chestback
/u1/excel/ELLAMENU
exit 0
fi
if [ $retry = 4 ]
then
cd /u1/excel/SysWatch
/u1/excel/SysWatch/ftp_systemwatch /u1/excel/SysWatch/Syswatch
/u1/excel/SysWatch/ftp_syswatch_back
/u1/excel/ELLAMENU
exit 0
fi
if [ $retry = 5 ]

then
clear
echo "\n\n\t. .RUNNING I S D SCRIPT ......"
sleep 4;
cd /u1/excel/isabel
/u1/excel/isabel/ftp_ISD
/u1/excel/isabel/ISDscript
/u1/excel/isabel/ftp_ISDback
echo "\n\n\t. .FINISHED RUNNING I S D SCRIPT ......"
/u1/excel/ELLAMENU
exit 0
fi
if [ $retry = 6 ]
then
/u1/excel/ELLAMENU
exit 0
fi
if [ $retry = 7 ]
then
clear
echo "\n\n\n\t\t\t SUB MENU "
echo "\n\n"
/u1/excel/SplitF/SubMenu
exit 0
fi
if [ $retry = 8 ]
then
clear
echo "\n\n\t. .RUNNING PART 1 - Inpatients ......"
sleep 4;
cd /u1/excel/BedStats/ipbsdir
/u1/excel/BedStats/ipbsdir/ftp_bedstats
/u1/excel/BedStats/ipbsdir/bedstats
/u1/excel/BedStats/ipbsdir/ftp_bedstatsback
echo "\n\n\t. .FINISHED RUNNING Part 1 - Inpatients ......"
/u1/excel/ELLAMENU
exit 0
fi
if [ $retry = 9 ]
then
clear
echo "\n\n\t. .RUNNING PART 2 - Day Bed Units ......"
sleep 4;
cd /u1/excel/BedStats/dbudir
/u1/excel/BedStats/dbudir/ftp_dbu
/u1/excel/BedStats/dbudir/dbu
/u1/excel/BedStats/dbudir/ftp_dbuback
echo "\n\n\t. .FINISHED RUNNING Part 1 - Inpatients ......"
/u1/excel/ELLAMENU
exit 0
fi
if [ $retry = 10 ]
then
/u1/excel/ELLAMENU
exit 0
fi
if [ $retry = 11 ]
then
/u1/excel/ELLAMENU
exit 0
fi
if [ $retry = 12 ]
then
clear
/u1/excel/DayScript/Run_Script
sleep 5
/u1/excel/ELLAMENU
exit 0

fi
if [ $retry = 13 ]
then
/u1/excel/ELLAMENU
exit 0
fi

if [ $retry = 14 ]
then
/u1/excel/ELLAMENU
exit 0
fi
if [ $retry = 15 ]
then
/u1/excel/ELLAMENU
exit 0
fi
if [ $retry = 16 ]
then
/u1/excel/ELLAMENU
exit 0
fi
if [ $retry = 17 ]
then
/u1/excel/ELLAMENU
exit 0
fi
if [ $retry = 18 ]
then
/u1/excel/ftp_waitback
/u1/excel/ELLAMENU
exit 0
fi
if [ $retry = q -o $retry = Q ]
then
clear
echo "\n\n\n\n\t"
echo " " ; echo " "; echo " Program Terminated "
echo " "; echo " "
exit 1
fi
done

Last edited by Gerry405; 12-02-2005 at 03:03 PM..
# 2  
Old 12-06-2005
first off --- does /bin/sh exist in your "new" box? and if it does, are the paths mentioned in your script also the same paths?
# 3  
Old 12-08-2005
bsd-sh

thanks, I'll check and get back to you
# 4  
Old 12-09-2005
paths and permissions

I checked for bin/sh and it's there and the paths are also there, so it's really strange...I also checked permissions on the folders and contents and whether or not executable...they all appear to be fine...
# 5  
Old 12-09-2005
when you FTP the files over --- did you reset their permissions like they were in the DataGen box?

f yes, try recopying the files again a little bit differently ... tar all the necessary files/directories in the old box, compress the tar file and then FTP it over to your FreeBSD box ... uncompress, untar and try again ... if still not working, make sure the account that owns the files/directories exist in the BSD box --- fix as required ...

Last edited by Just Ice; 12-10-2005 at 08:58 PM.. Reason: misspelled FTP
# 6  
Old 12-09-2005
Thanks, I would try that but the only option is to ftp these files, as the Data General Box has a DLT but my home server running freebsd does not have this type of drive
# 7  
Old 12-10-2005
the only thing i suggested you add to the out transfer process was to tar and compress the files/directories first prior to using FTP to transfer them over ...

and check file/dir ownership and permissions ...
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Trouble executing piped shell commands in perl code

I am trying to execute a piped combination of shell commands inside a perl program. However, it is not working as desired. This is my program, i am trying to print only filenames from the output of ls -l $ cat list_test #!/usr/bin/perl -w use strict; my $count=0; my @list=`ls -l|awk... (4 Replies)
Discussion started by: sam05121988
4 Replies

2. Shell Programming and Scripting

trouble executing a command in csh

Hi All!! I am having trouble in executing the following command into a c-shell script. mv "$file" "$(head -1 "$file")" The funny thing is that the same command works perfectly from the command line, but when incorporated into a "foreach loop" of a c-shell script, it shows an error -... (1 Reply)
Discussion started by: chen.xiao.po
1 Replies

3. Shell Programming and Scripting

trouble in running script

HI admin unix, I'm from indonesia that currently work as system admin for server under AIX/UNIX environment. I have some trouble when running script as follow : ## vdate() { sqlplus -s ${MMUSER}/${PASSWORD} <<-eot|grep -v '^$' set heading off feedback off select... (2 Replies)
Discussion started by: cahyo3074
2 Replies

4. BSD

for linux and BSD users interested in Unix system V/bsd

for all you unix/linux interested heres an online book for free that covers the basics of BSD SysV Unix commands and applications . giving the average linux user a perspective on the differences in context of the two operating systems and for BSD users covers material as a refernce guide. ... (0 Replies)
Discussion started by: moxxx68
0 Replies
Login or Register to Ask a Question