- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Script error.
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
Discussions
Discussions
Forums
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
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
тАО02-27-2009 06:04 AM
тАО02-27-2009 06:04 AM
sed: Function s/ * cannot be parsed.
sed: Function s/ cannot be parsed.
/usr/local/bin/filesystemcheck.sh[66]: emailfile: not found.
"emailfile" [New file]
*************************************************
Cron: The previous message is the standard output
and standard error of one of your crontab commands:
/usr/local/bin/filesystemcheck.sh
Can any of you give me an idea of what is wrong? It runs smoothly on all of my other servers, and all of my server are the same software. HP-UX 11.11 all gold packs applied.
Solved! Go to Solution.
- Tags:
- sed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2009 06:09 AM
тАО02-27-2009 06:09 AM
Re: Script error.
#!/usr/bin/sh -x
Then run it again, capture the output and attach it here.
The '-x' turns on 'debug mode' for the shell.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2009 06:13 AM
тАО02-27-2009 06:13 AM
Re: Script error.
I see two things based on your attachment.
1. Always begin your script's with a shebang line:
#!/usr/bin/sh
...or whatever interpreter is appropriate.
2. You are missing a 'done' as the last line to match the 'do' loop.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2009 06:15 AM
тАО02-27-2009 06:15 AM
Solutionexceeded=`bdf | sed '/^Filesystem/d' | head -$count | tail -1 | sed 's/ *
/:/g' | cut -d ":" -f5`
Try to move it to 1 line:
exceeded=`bdf | sed '/^Filesystem/d' |head -$count | tail -1 | sed 's/ * /:/g' | cut -d ":" -f5`
Check all lines for such errors.
regards,
ivan
- Tags:
- bdf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2009 06:22 AM
тАО02-27-2009 06:22 AM
Re: Script error.
Missing a done? If I was missing a done, the script wouldn't work on my other servers. Right?
Crap there is a LB on those lines. I am retarded I swear! BRB fellas.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2009 06:26 AM
тАО02-27-2009 06:26 AM
Re: Script error.
- Tags:
- missing attachment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2009 06:27 AM
тАО02-27-2009 06:27 AM
Re: Script error.
Ivan spotted a very big problem unless it is only a manifestion of posting your script here. That is, you can't split commands across lines. You don't need to confine your line length to a terminal line width although this makes readability, printing and editting easier.
If you want to "split" lines, use the line continuation character. For example at the line 42 Ivan cited, you could break the line into three lines like:
exceeded=`bdf | sed '/^Filesystem/d' | \
head -$count | tail -1 | \
sed 's/ */:/g' | cut -d ":" -f5`
...NOTICE that there are no trailing spaces after the continuation character (\) either.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2009 06:39 AM
тАО02-27-2009 06:39 AM
Re: Script error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2009 06:40 AM
тАО02-27-2009 06:40 AM
Re: Script error.
James/Ivan/Patrick, Always a pleasure and you all always know what needs done. One day I will ahve this scripting thing down.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2009 06:41 AM
тАО02-27-2009 06:41 AM