LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices

Closed Thread
 
LinkBack Search this Thread
Old 09-11-2012, 12:50 AM   #1
Katsnor
LQ Newbie
 
Registered: Sep 2012
Posts: 2

Rep: Reputation: Disabled
we have a Universe database and ..


Hi,

we have a Universe database and we already know how to shell down to command line and call the shell script, but we don't know ho to modify the scripts to accept input from the program. Can you help me please??
The program uses the following syntax to call the shell script:


SIN=\"sendEmail -f \:FROM:\@gwk.co.za -t \:TO:\@gwk.co.za -u '\:SUBJECT:\' -m '\:MESSAGE:\' -a '\:ATTACHMENT:\'"\
EXECUTE \SH -c \:SIN

The script that is called:

Code:
#!/bin/bash
a=$1

foo ()
{
vlag=''
subject=''
att=''
to=''
empty='empty'
message=''
counter=1

for ARG in "$@"
do
if test "$vlag" = "$empty"
then
vlag=$ARG
else
case $vlag in
-t)
if test $counter -eq 1
then
to=$ARG
else
to=$to","$ARG
fi
counter=2;;
-a)
att=$att" -attach "$ARG;;
-u)
subject=$ARG;;
-m)
message=$ARG;;
esac
vlag="empty"
fi

done
emailstring="email -s '"$subject"' "$att" "$to
echo $emailstring
eval $emailstring
}

CAN YOU PLEASE HELP ME TO MAKE A CONNECTION????
 
Old 09-11-2012, 02:31 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,524
Blog Entries: 51

Rep: Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601
Post your thread once in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
enabling universe landorone1 Linux - Mobile 4 11-24-2011 05:54 PM
LXer: You know the universe is out to get you when.... LXer Syndicated Linux News 0 02-27-2011 09:51 PM
Hello Universe ffly LinuxQuestions.org Member Intro 2 11-16-2007 12:10 PM
Universe Repositories phantom_cyph Ubuntu 5 03-06-2007 10:29 AM
Ubuntu universe on CD Bogdan Ubuntu 2 02-16-2006 12:57 PM


All times are GMT -5. The time now is 04:38 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration