User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Shell Scripting section within the Software Development category of DaniWeb, a massive community of 427,065 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,346 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Shell Scripting advertiser: Programming Forums
Views: 843 | Replies: 5
Reply
Join Date: Feb 2008
Posts: 4
Reputation: abhey_1998 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
abhey_1998 abhey_1998 is offline Offline
Newbie Poster

Need help writing UNIX shell scripts, Please help!

  #1  
Feb 18th, 2008
Hi,
I am in need of writing a shell script to read, database table and email the results to a list of users.
Please let me know if I could provide further info.
Please assist.
Thanks,
-Abhey
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2006
Location: Bristol, UK
Posts: 313
Reputation: chris5126 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 13
chris5126 chris5126 is offline Offline
Posting Whiz

Re: Need help writing UNIX shell scripts, Please help!

  #2  
Feb 19th, 2008
hi can you give us any code you have written so far and a few lines of the database and what needs to be in the email format etc
If my post helped add to my rep!
Reply With Quote  
Join Date: Feb 2008
Posts: 4
Reputation: abhey_1998 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
abhey_1998 abhey_1998 is offline Offline
Newbie Poster

Re: Need help writing UNIX shell scripts, Please help!

  #3  
Feb 19th, 2008
Originally Posted by chris5126 View Post
hi can you give us any code you have written so far and a few lines of the database and what needs to be in the email format etc


Hi, thanks for getting back to me.

To log into sql pls ( in the shell script. )
-- get the data.

$ORACLE_HOME/bin/sqlplus -s usr/pwd@database << EOF1 > msgbody
$LOGIN_PSWD
set feedback off
whenever sqlerror exit failure
EOF1

-- send email out.

cat msgbody | mailx -s "Subject:OnlyBody" someone@gmail.com
Reply With Quote  
Join Date: Feb 2006
Location: Bristol, UK
Posts: 313
Reputation: chris5126 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 13
chris5126 chris5126 is offline Offline
Posting Whiz

Re: Need help writing UNIX shell scripts, Please help!

  #4  
Feb 20th, 2008
d
Last edited by chris5126 : Feb 20th, 2008 at 3:58 am.
If my post helped add to my rep!
Reply With Quote  
Join Date: Feb 2006
Location: Bristol, UK
Posts: 313
Reputation: chris5126 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 13
chris5126 chris5126 is offline Offline
Posting Whiz

Re: Need help writing UNIX shell scripts, Please help!

  #5  
Feb 20th, 2008
hi what format is the data in within the spreadsheet e.g

name dob address car reg

or

name
dob
address
car reg

etc

and what format do you want the data to be in the email??
If my post helped add to my rep!
Reply With Quote  
Join Date: Feb 2008
Posts: 4
Reputation: abhey_1998 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
abhey_1998 abhey_1998 is offline Offline
Newbie Poster

Re: Need help writing UNIX shell scripts, Please help!

  #6  
Feb 20th, 2008
Email would go to each sales rep
Subject line would be: commision paid
Body would be:
Commission paid for the following order
order no amt date
123 $2 2/2/08
345 $1 2/3/08 etc....
Please let me know if that helped.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Shell Scripting Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Shell Scripting Forum

All times are GMT -4. The time now is 4:08 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC