Sponsored Content
Top Forums Shell Programming and Scripting [Help] Bash script that runs in the background and checks for mails... Post 302986236 by capo2ndfret on Tuesday 22nd of November 2016 11:40:20 AM
Old 11-22-2016
Display [Help] Bash script that runs in the background and checks for mails...

Hello! I have got a homework. The bash script runs in the background and checks the user's mailbox and when the user gets a new mail a popup window appears with some text and information about the sender (from who and when).I have no idea how to start, any help would be appreciated! Thank youSmilie
 

9 More Discussions You Might Find Interesting

1. Solaris

Best practice to run bash script in background

nohup /bin/bassh $HOME/scripts/test.sh > $HOME/log/test.log 2>&1 & nohup $HOME/scripts/test.sh > $HOME/log/test.log 2>&1 & Which is the good practice to run a script in background of above two ? does the first one will have any overhead on the system ? our system is SunOS 5.10... (2 Replies)
Discussion started by: mmasals
2 Replies

2. Shell Programming and Scripting

[Bash] MD5 Checks with Script.

Hi. I'm triyng to make a Bash Script that checks (recursively) the MD5 from all the files in a certain directory and compare them against some other check that should be already done and saved in a file. I've reached to the point where i have the MD5 from the file and the MD5 that the script... (1 Reply)
Discussion started by: BiFo
1 Replies

3. Shell Programming and Scripting

[bash] run a shell who runs commands

Hi all. On X11 I'm on a shell ...shell_1 (/bin/bash). From here I want to open another shell window shell_2 who executes commands like "ls -l" or programs like ". /program"... so the "result" of commands shows in shell_2 window and not in shell_1. Is that possible ? (4 Replies)
Discussion started by: jerold
4 Replies

4. Shell Programming and Scripting

Need to run a bash script that logs on as a non-root user and runs script as root

So I have a script that runs as a non-root user, lets say the username is 'xymon' . This script needs to log on to a remote system as a non-root user also and call up a bash script that runs another bash script as root. in short: user xymon on system A needs to run a file as root user and have... (2 Replies)
Discussion started by: damang111
2 Replies

5. Shell Programming and Scripting

Script to do the following checks

Hi , I need a script for processing below scenario. I have to check daily by doing ftp IP to check it is logging or not. So i want this activity to be automated such that if login succesful i will get "FTP LOGIN SUCCESS" in a log file and if fails i want the error message in the same log... (1 Reply)
Discussion started by: sv0081493
1 Replies

6. UNIX for Dummies Questions & Answers

Bash script that runs permanently

Hello,Geeks How i can run my script permanently. once i run my script it should be working always. like installation. for example if i run one command once in bash script. it must be permanently run in my linux machine.. Thanks in Advance (2 Replies)
Discussion started by: dhanda2601
2 Replies

7. Shell Programming and Scripting

[BASH] Script to manage background scripts (running, finished, exit code)

Heyas, Since this question (similar) occur every now and then, and given the fact i was thinking about it just recently (1-2 weeks) anyway, i started to write something :p The last point for motivation was... (17 Replies)
Discussion started by: sea
17 Replies

8. Shell Programming and Scripting

Bash tcsh Script runs in terminal but not folder

So, I made a script beginning with #!/bin/bash on gedit. And I double clicked it to run in terminal and I end up with "The child process exited normally with status 127" and "command not found". If I run the same script from the terminal as "tcsh (script name)" it runs just fine. If I... (8 Replies)
Discussion started by: OntorEska
8 Replies

9. Shell Programming and Scripting

Need Multiple checks inside if condition in a bash shell script

Hi, I need to perform the untar and rm operation if the file found is a .tar and does not have test.tar or hello.tar as the file names. Below is the loop to check the same. for tf in *.tar do if ] then found=1 ... (1 Reply)
Discussion started by: mohtashims
1 Replies
NEWMAIL(1)							  Mail Utilities							NEWMAIL(1)

NAME
newmail - biff like tool for the terminal SYNOPSIS
newmail [-b] [-h] [-i interval] [-r] [-w] [ mbox [...]] DESCRIPTION
The newmail program monitors a given set of mailboxes and looks for new mail. If new mail is received the sender and subject will be writ- ten on the terminal it was started from. By default newmail puts itself in the background so the console is still usable. newmail is able to monitor arbitrary numbers of mailbox files. If no mailbox was specified on the commandline it will monitor the default mailbox, which may be overwritten by the MAIL environment variable. If more than one mailbox is being monitored, a prefix is printed for each mail line so the user can distinguish between the different mail- box files. By default the prefix is the name of the mailbox without its path. If a mailbox is specified as path=string then string will be used as prefix for mails received in the mailbox denoted by path. newmail is able to decode header lines when non-ascii characters are transported. They will be displayed properly if the locale (LC_CTYPE) is set accordingly. OPTIONS
-b Ring a bell after one or more incoming mails have been detected for at least one mailbox. -h Print a help message. -i interval Set the interval between two mailbox checks to interval seconds. The default is 60 seconds which is suffient for the terminal. For the use inside of a window or dock application a lower value may be prudent. -r Emit raw data from the mail. This will bypass routines to decode character encodings used for mail headers as described in RFC 2047. This may be useful for window applications that want to decode the strings on their own. -w Run as window application. This will prevent newmail from moving itself into the background so its output can be used as input for a window application. This will also change the output format slightly and prevent a bell to be rung after new mail has been received. OUTPUT FORMAT
The output format differs from being read by humans and programs (-w). newmail: >> Mail from <from> - <subject> >> Priority mail from <from> - <subject> >> <folder>: Mail from <from> - <subject> >> <folder>: Priority mail from <from> - <subject> newmail -w: <from> - <subject> Priority: <from> - <subject> <folder>: <from> - <subject> <folder>: Priority: <from> - <subject> It should be easy for third party programs which are interested in such information to parse the output when newmail is running with the -w option. ENVIRONMENT
newmail supports the following environment variables: LANG Locale setting for the output character set. LC_CTYPE Locale setting only for the output character set. MAIL Full path of the user's spool mailbox. NOTES
This program is inspired by the newmail program from the Elm interactive mail program. It is a rewrite from scratch though. Many thanks go to Dave Taylor and the Elm Development Group who have provided me with a great mail program for several years. Many addi- tional thanks go to the former lead developer Dave Taylor who started the program back in 1986. SEE ALSO
locale(7). AUTHOR
Joey Schulze <joey@infodrom.org> Infodrom Oldenburg February 8th, 2006 NEWMAIL(1)
All times are GMT -4. The time now is 01:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy