Sponsored Content
Full Discussion: Any help gratefully received
Top Forums Shell Programming and Scripting Any help gratefully received Post 303021179 by nobbyall on Monday 6th of August 2018 03:11:29 AM
Old 08-06-2018
Any help gratefully received

Multiple questions coming your way.
A little back ground info as to why I am back to basics.
A dear friend of mine passed away recently and as a request by him I have promised to keep his project alive. The problem I have it was being handed over when he was in the last weeks of his life and after ten minutes or so was shot to bits by the drugs.
I have the program running but there are a few little niggle that I need for it to run how it should.

He complied it to run on Linux/GNU but that is all I know.

Forgive me for my ignorance but it has been many years since I left engineering where I use to play with computers and design websites.

I have pasted just a snippet of the ./conv09 coding that should allow me to send emails but I cannot select the email I wish to send.

Once again, thank you for any help received and Admin, kick this out if I am in the wrong forum please.

Code:
# !/bin/bash

# Email Creation
# Make sure the file contains only one message and is "compacted"...
# Make sure that a dummy attachment was done, if applicable
# Slice this off, just after the end of the main message.

# NB FileSpec (See below) items are looked for within the user's subdir ONLY...
# This means that CollectUserFiles may need to be re-run before CreateEmails
# i.e. Files MUST have already been collected by ./conv08

# Attachments
# Mode : NoAttach  # The default if none specified...
# Mode : Auto      # Attach the "FileSpec" files from the Users sub-directories
# FileSpec :       # The default is '*' if none specified...
# DON'T HAVE _ (Underscore) Characters in any file names (messes with sed)...
# Ditto spaces, they can be a pain in the backside...

clear

#emlFileName="FileName[:Mode[:FileSpec]]"
#emlFileName="$EmailDir/00-Initial.eml:Auto:*.png"
#emlFileName="$EmailDir/00-Intro.eml:Auto"
#emlFileName="$EmailDir/01-Added-To-List.eml"
#emlFileName="$EmailDir/01-Follow-Up.eml"
#emlFileName="$EmailDir/02-Intro-No-Reply.eml"
#emlFileName="$EmailDir/02-Opt-In.eml"
#emlFileName="$EmailDir/02-Opt-In-Final.eml"
#emlFileName="$EmailDir/02-Opt-In-No-Reply.eml"
#emlFileName="$EmailDir/02-Removed-From-List.eml"
#emlFileName="$EmailDir/03-Diagrams-Offer.eml"
#emlFileName="$EmailDir/04-Diagrams-Added.eml:Auto:Diagrams*.pdf"
#emlFileName="$EmailDir/04-Diagrams-SentLate.eml:Auto:Diagrams*.pdf"
#emlFileName="$EmailDir/04-Intro-MakeIB.eml:Auto:*MakeIB*"
#emlFileName="$EmailDir/04-Intro-P-Swap.eml:Auto"
#emlFileName="$EmailDir/20-Latest.eml:Auto"
#emlFileName="$EmailDir/20-Latest-Delayed.eml"
#emlFileName="$EmailDir/20-Latest-Req-Feedback.eml"
#emlFileName="$EmailDir/20-LinkMove.eml:Auto"
#emlFileName="$EmailDir/30-DiaryEntries.eml:Auto:Help.Add-DE.txt;*.DE*"
#emlFileName="$EmailDir/31-DiaryEntries-PreInstalled.eml:Auto:*.ods"
#emlFileName="$EmailDir/99-GenericReUseMe.eml"
#emlFileName="$EmailDir/99-HandOver.eml"
#emlFileName="$EmailDir/99-Shell-No-Attach.eml"


#UserListFileName="$UserListFileName.unconfirmed"

LessUsers=0 # Bodge to change the count value, if necessary...
TotalUsers=$((TotalUsers-LessUsers))

if [ -z "$emlFileName" ]; then
  ERROR "No emlFileName selected..."
  exit 1
fi

if [ "$OSdetected" = "Linux" ]; then
  hostname="$HOSTNAME"
else

  # ... on a Mac, this may get appended with .local or .lan (LAN)
  hostname="`echo $HOSTNAME | cut -d '.' -f1`" 
fi

hostname=z

if [ ! "$hostname" = "main-pc" ] && [ ! "$hostname" = "irh-macbook" ]; then
  echo "${ATTRBOLD}##########################################################################${ATTRCLEAR} " 
  echo ""

  WARNING "hostname \"$hostname\" Has not been recognised and has been re-assigned the name \"deputy\""
  hostname="deputy"
fi

 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Correctly received bytes?

I have been puzzled over how to find out between correctly received bytes and total received bytes in the UNIX system. So far, I guess that the information provided by the ifconfig or netstat command provides me with the total transmitted/received packets and bytes over each of my connections.... (2 Replies)
Discussion started by: mint1981
2 Replies

2. Email Antispam Techniques and Email Filtering

(Received):. (66.55.160\.|66.55.161\.)

Can you suggest a way of rewriting rule below that would ensure that the class C "66.55.160" is blocked but "166.55.160.*" would pass? :0 * ^(Received):.*(66.55.160\.|66.55.161\.|66.55.162\.|66.55.163\.|66.55.164\.|66.55.165\.|66.55.166\.|66.55.167\ .) { LOG="(ISKIMARO vendare 1) " ... (0 Replies)
Discussion started by: jones
0 Replies

3. Linux

SIGHUP received to pppd

Hi all, I have a question about pppd. I got a Slack box with kernel 2.4.20. I'm learning how to connect my CONSOLE to internet with a chat script. Following these steps, MANY times I can connect to internet very pretty nice. But also MANY times (says 50%-50%) SIGHUP received to pppd... (2 Replies)
Discussion started by: jaguar
2 Replies

4. Solaris

Received duplicate M_IOCACK

Hi, I've got this message in /var/adm/messages... "genunix: Warning: 4a56a80 Received duplicate M_IOCACK" I get the messages maybe 6 times a day, or some days not at all. The number after "Warning:" is different each time. The system is Sun Blade 2500 running Solaris 9. I can't find... (0 Replies)
Discussion started by: omegad22
0 Replies

5. AIX

Forwarding already received mail?

Greetings to all of you. I am a tad desperate here. I have found MANY articles scattered across the internet from google searches and unix.com searches for how to forward mail that say: Create a ~/.forward file and put XXXX in it. This is not what I need to do. We have bunch of users... (1 Reply)
Discussion started by: DennisC31
1 Replies

6. Forum Support Area for Unregistered Users & Account Problems

no email received

I have tried to register and got a message saying an email would be sent but no email has turned up. Could you try again please? (1 Reply)
Discussion started by: lookingfor help
1 Replies

7. UNIX for Advanced & Expert Users

problem on email sent but not received

hi.. I have the porblem where the email was sent but not received by users.. The message as below:- Dec 16 11:42:04 isp postfix/smtp: A80042B4B: to=<user_name@example.com.my>, relay=smtp.example.com.my:25, delay=890, delays=0.17/0.02/31/859, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued... (1 Reply)
Discussion started by: bh_hensem
1 Replies

8. Solaris

Mail from mailx not received

Hi , I'm trying to send a mail from a sunOS machine that is within hp network to my email: eman.el-badawy@hp.com ,the user trying to send is 'project',,but seems the mail address can not be resolved checking /var/log/syslog i got the following: Dec 25 14:34:02 svddev15 sendmail: ... (1 Reply)
Discussion started by: Eman_in_forum
1 Replies

9. Forum Support Area for Unregistered Users & Account Problems

No activation email received

I have tried to register today with the username BatterBits, but have not received the activation email I do not live in any of the restricted countries - unless the UK has suddenly become a threat! I'd be grateful if you would assist. many thanks Ian (2 Replies)
Discussion started by: unregistered
2 Replies

10. UNIX for Beginners Questions & Answers

Error received

I have a program that i need to get done that gets the person's name and his grade then prints it in this order "name-grade-gradeletter" so i wrote this code: #!/bin/bash while :; do read -p "Enter the person's name: " name read -p "Enter the grade of the person: " grade case $grade in )... (3 Replies)
Discussion started by: UniverseCloud
3 Replies
All times are GMT -4. The time now is 04:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy