- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Unix shell script CGI
Operating System - Linux
1748054
Members
4709
Online
108758
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
тАО07-02-2006 08:30 PM
тАО07-02-2006 08:30 PM
Hi all,
when I login as root on our hp9000, and execute the script test to print a file, it works fine
#!/bin/sh
export PRINTER=lj402
if [ -s outsam.9001 ] ; then
lp outsam.9001
fi
When I post execute the above script by a html screen as a cgi script, it won't print anything.
Can anyone help me out please.
Thank you in advance.
when I login as root on our hp9000, and execute the script test to print a file, it works fine
#!/bin/sh
export PRINTER=lj402
if [ -s outsam.9001 ] ; then
lp outsam.9001
fi
When I post execute the above script by a html screen as a cgi script, it won't print anything.
Can anyone help me out please.
Thank you in advance.
Solved! Go to Solution.
- Tags:
- CGI
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2006 08:34 PM
тАО07-02-2006 08:34 PM
Solution
Check the error logfile.
I would use the full pathname, /usr/bin/lp
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!
I would use the full pathname, /usr/bin/lp
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2006 08:43 PM
тАО07-02-2006 08:43 PM
Re: Unix shell script CGI
It works. Thank you!!
That was easy, I should have know that.
Thank you again.
Rob
That was easy, I should have know that.
Thank you again.
Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2006 08:50 PM
тАО07-02-2006 08:50 PM
Re: Unix shell script CGI
Shalom,
You need a statement at the top to set the print type for html.
In perl it looks like this:
print "Content-type: text/html\n\n";
echo -e "Content-type: text/html\n\n"
Should work or two line feeds after the html.
SEP
You need a statement at the top to set the print type for html.
In perl it looks like this:
print "Content-type: text/html\n\n";
echo -e "Content-type: text/html\n\n"
Should work or two line feeds after the html.
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP