- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Script issue, help!
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2005 09:57 PM
09-15-2005 09:57 PM
I have a script (dell_MAN_get.sh) which calls a couple of sub-scripts and basically FTP's particular filespecs from a remote server, sorts these files accordingly (sub-script 'dell_MAN_sort.sh'), checks for rejected files before 'at'ing (rescheduling) itself again and resuming the process.
The problem I have is that the script does not get past the 'dell_MAN_sort.sh' sub-script and as such the files do not get checked for rejects or more importantly rescheduled.
I have attached the two scripts, big points to any effective helpers.
Rgds,
Dermot.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2005 10:01 PM
09-15-2005 10:01 PM
Re: Script issue, help!
........and the problemic sub-script which works corectly but does not return back to the main script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2005 10:14 PM
09-15-2005 10:14 PM
Re: Script issue, help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2005 10:20 PM
09-15-2005 10:20 PM
Re: Script issue, help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2005 10:49 PM
09-15-2005 10:49 PM
Re: Script issue, help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2005 11:40 PM
09-15-2005 11:40 PM
Re: Script issue, help!
The redirection to the /dev/null has actually been commented out of the script. I can also see from the 'set -x' that the script isn't even reaching this point.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2005 12:41 AM
09-16-2005 12:41 AM
Re: Script issue, help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2005 01:53 AM
09-16-2005 01:53 AM
Re: Script issue, help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2005 02:00 AM
09-16-2005 02:00 AM
Re: Script issue, help!
Does "set -x" echo the "done" as well?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2005 02:03 AM
09-16-2005 02:03 AM
Re: Script issue, help!
#!/bin/sh
at the beginning of del_MAN_sort.sh perhaps? Or whatever shell you want to run it under.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2005 02:06 AM
09-16-2005 02:06 AM
Re: Script issue, help!
It echo's the done also plus I have included an exit 1 in an attempt it force it to revert back to the main script but this doesn't work either.
I have actually included the shell (#!/bin/sh) atthe beginning of the script also but simply haven't included this in my attachment, apologies about that.
D.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2005 02:09 AM
09-16-2005 02:09 AM
Re: Script issue, help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2005 02:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2005 02:14 AM
09-16-2005 02:14 AM
Re: Script issue, help!
I haven't actually called the subscript from the main script in that exact format but I'll give to a go.....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2005 02:15 AM
09-16-2005 02:15 AM
Re: Script issue, help!
Everything looks correct, but seeing the debug output would be helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2005 02:53 AM
09-16-2005 02:53 AM
Re: Script issue, help!
it may not help, but try changing the line
for FILENAME in [ `cat $SRCDIR/man_files` ]; do
to
for FILENAME in $(cat $SRCDIR/man_files); do
as I think the shell will regard the brackets as file names...
Does man_files contain only plain files?
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2005 04:00 AM
09-16-2005 04:00 AM
Re: Script issue, help!
Patrick, I will gladly forward you the debug for this on Tuesday.
Stephen, I will also look forward to calling the subscript in the manner you suggested.
Thanks,
Dermot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2005 04:55 AM
09-16-2005 04:55 AM
Re: Script issue, help!
IMHO, the shell is getting confused between command substitution and test command syntax i.e.
>> for FILENAME in [ `cat $SRCDIR/man_files` ]; do <<
The above command will set the variable FILENAME to the name of the files in the $SRCDIR punctuated by brackets. Change the above for loop to:
>> for FILENAME in `cat $SRCDIR/man_files` ; do <<
OR
>> for FILENAME in $(cat $SRCDIR/man_files) ; do <<
hope it helps!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2005 11:38 PM
09-18-2005 11:38 PM
Re: Script issue, help!
could you please show us what dell_file_check.sh does?
and perhaps make an "ls -l" on the the list of files in $SRCDIR/man_files?
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2005 11:52 PM
09-18-2005 11:52 PM
Re: Script issue, help!
Just change script as functions in the same script.
Like,
sort()
{
}
reject()
{
}
If you are not sure then attach all relavent scripts to your requirement here. It will give an opportunity to give quick and effective solution.
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2005 10:59 PM
09-19-2005 10:59 PM
Re: Script issue, help!
Stephen, you're suggestion hit the nail on the head, I needed to call the subscript by opening the shell first of all.
Thanks again!