- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Bourne shell script
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
тАО04-21-2003 08:57 PM
тАО04-21-2003 08:57 PM
Bourne shell script
write a Bourne shell that will allow a user to specify a number of files to be printed and which email the user with the results of the command. The script should email the user a list of the files that were sent to the printer as well as a list of the files that could not be sent to the printer.
i tried to do this but wont work...please help...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-21-2003 09:21 PM
тАО04-21-2003 09:21 PM
Re: Bourne shell script
It would be good if you could post out your script so that we may debug it.
- ramd.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-21-2003 09:32 PM
тАО04-21-2003 09:32 PM
Re: Bourne shell script
then
echo "Usage:./printfile directory_name" 1>&2
exit 1
else
cd $1 ls ; (ls | wc -w)
echo "Number of files to be printed: " 1>&2
read fileNo
while [ !$fileNo ]
do
lpr -P[printer]
lpr -m logname
done
fi
i dunno wat to do...quite embarassing to show my script actually
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-21-2003 09:40 PM
тАО04-21-2003 09:40 PM
Re: Bourne shell script
is this some kind of a home work u r looking for? :-(
do u have a script already built. if yes, pls post it. we can try to fix it.
hth
-balaji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-21-2003 09:44 PM
тАО04-21-2003 09:44 PM
Re: Bourne shell script
try this for checking if the lpr command returned successfully -
res=`lpr -P
if [[ $res -ne 0 ]]; then
echo "error occured while printing $docname"
else
echo "successfully printed $docname"
fi
HTH.
- ramd.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-21-2003 09:45 PM
тАО04-21-2003 09:45 PM
Re: Bourne shell script
try this for checking if the lpr command returned successfully -
res=`lpr -P
if [[ $res -ne 0 ]]; then
echo "error occured while printing $docname"
else
echo "successfully printed $docname"
fi
HTH.
- ramd.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-21-2003 09:46 PM
тАО04-21-2003 09:46 PM
Re: Bourne shell script
try this for checking if the lpr command returned successfully -
res=`lpr -P
if [[ $res -ne 0 ]]; then
echo "error occured while printing $docname"
else
echo "successfully printed $docname"
fi
HTH.
- ramd.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-21-2003 09:48 PM
тАО04-21-2003 09:48 PM
Re: Bourne shell script
- ramd.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-21-2003 10:16 PM
тАО04-21-2003 10:16 PM
Re: Bourne shell script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-21-2003 10:26 PM
тАО04-21-2003 10:26 PM
Re: Bourne shell script
Try the attached script.
call as ./sh.sh
ensure that execute permissions are available. if not, run
chmod +x sh.sh
- ramd.