Sponsored Content
Top Forums Shell Programming and Scripting Custom exit message according to flag Post 303045139 by sea on Thursday 12th of March 2020 01:42:48 PM
Old 03-12-2020
Id like to see the code for the commented line, because the code would be shorter.

Other than that sounds more lile homework to me.
Is it?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Where can I find a list of exit codes? (Exit code 64)

I'm receiving an exit code 64 in our batch scheduler (BMC product control-m) executing a PERL script on UX-HP. Can you tell me where I can find a list of exit codes and their meaning. I'm assuming the exit code is from the Unix operating system not PERL. (3 Replies)
Discussion started by: jkuchar747
3 Replies

2. Shell Programming and Scripting

cant get the right exit message

#!/bin/ksh application task run command //returns 0 if successful if ; then echo "Ran Fine" else echo "Didnt run" fi When I run the script, here is the output Status code = 0 ksh: [0: not found. Job didnt run any suggestions? (4 Replies)
Discussion started by: bryan
4 Replies

3. Programming

How to limit max no of message in a posix message queue

Hii can anyone pls tell how to limit the max no of message in a posix message queue. I have made changes in proc/sys/fs/mqueue/msg_max But still whenever i try to read the value of max. message in the queue using attr.mq_curmsgs (where struct mq_attr attr) its giving the default value as 10.... (0 Replies)
Discussion started by: mohit3884
0 Replies

4. AIX

du flag -x

Hi, I would like to know if there's any option to use with the du command so that I can list only the files/directories on the current filesystem... I usually use du -gs *But I'd like to see only the directories in the filesystem I am on, and not the mount point directory of other fss... ... (6 Replies)
Discussion started by: Casey
6 Replies

5. Shell Programming and Scripting

Printing all lines before a specific string and a custom message 2 lines after

Hello all, I need to print all the lines before a specific string and print a custom message 2 lines after that. So far I have managed to print everything up the string, inclusively, but I can't figure out how to print the 2 lines after that and the custom message. My code thus far is:... (4 Replies)
Discussion started by: SEinT
4 Replies

6. UNIX for Dummies Questions & Answers

'h' flag in du

Hey, all! Why is the "human readable" flag changing the behavior of du? And while I'm at it, can you make du only look at files, not directories. I often find myself wanting to find the largest file(s) in a dir or vol. Using 'find' itself, it seems you have to at least be able to guess the size of... (2 Replies)
Discussion started by: sudon't
2 Replies

7. Shell Programming and Scripting

Need the difference between exit 1 & exit 7

Hi In one of the script I am seeing some thing like exit 7,exit 1,exit 2,exit 3,exit 9,exit6.What is the difference between all of this exit.Can anyone help here please (3 Replies)
Discussion started by: ginrkf
3 Replies

8. UNIX for Dummies Questions & Answers

Get the id with specify flag

.... means multi line ddd,bug fgdrg dfdfsdfdfsd fsdfdfdfd fdfdsfdsfsd ....... flag2 ...... aaa,bug sfsfsfsfs dfdfsdfdfsd fsdfdfdfd fdfdsfdsfsd ...... flag1 ...... ddd,bug fgdrg dfdfsdfdfsd (9 Replies)
Discussion started by: yanglei_fage
9 Replies

9. Shell Programming and Scripting

awk to supress error message with custom text

After a bash function is run the below file is produced: out_name.txt tab-delimeted Input Errors and warnings AccNo Genesymbol Variant Reference Sequence Start Descr. Coding DNA Descr. Protein Descr. GeneSymbol Coding DNA Descr. GeneSymbol Protein Descr. Genomic... (3 Replies)
Discussion started by: cmccabe
3 Replies

10. IP Networking

Insmod custom module fails with message : disagrees about version of symbol ...

Hello : I want to make a netfilter conntrack module for myself. So I copy all the source code about netfilter conntrack from kernel source tree to my external directory. It can be insmod after compiled. Then I add some members to the struct nf_conn, and it 's compiled successfully. However, it... (1 Reply)
Discussion started by: 915086731
1 Replies
MAILSOUND(1)						      General Commands Manual						      MAILSOUND(1)

NAME
mailsound - play sounds when mail is received SYNOPSIS
mailsound [-hszZvrd] soundname ... DESCRIPTION
mailsound allows a user to play sounds when new mail arrives. It reads a mail message from stdin and uses Mark Boyns' rplay library to play sounds. The sound that is played is determined by a configuration file in the user's home directory called .mailsounds. Each line in this file has two parts. The first part is a regular expression which will be used to match the from address from a mail message. The second part describes what to do when a match is found. The options in the second part are identical to the options on the command line. The command line options will set defaults which will be used if they are not specified in the configuration file. If not specified, the mailsound program will use the following defaults: default sound: youvegotmail.au default volume: 127 (50%) If the mail address does not match any of the regular expressions in the .mailsounds file, no sound will be played. OPTIONS
-h hostname:[hostname...] Play sounds on all of these hosts. -z <minsize>:<minvolume>,<maxsize>:<maxvolume> The volume the sound will be played at will be determined by the size of the mail message. The sound for a message with a size smaller than <minsize> will be played at volume <minvolume>. The sound for a message with a size larger than <maxsize> will be played at volume <maxvolume>. The sound for a message with a size between <minsize> and <maxsize> will be played at a volume which is a linear interpolation between <minvolume> and <maxvolume>. -Z <minsize>,<maxsize> The sound to be played is determined by the size of the mail message. If the message is smaller than <minsize>, the first listed sound is played. If the message is larger than <maxsize>, the last listed sound is played. If the message size is between those two values, the appropriate sound from the list is played. -s <subject re> The regular expression supplied will have to match the subject of the message. If this option is not there, the subject of the mes- sage is completely ignored. Be careful that the regular expression does not contain spaces. Due to laziness of the author of this program, this will hopelessly confuse the program. -v <int> Set the volume at which the sound should be played. The range is 0-255. -r Pick a sound at random from the list of sounds provided. -d Turn on debugging. This will produce diagnostic output to stdout. EXAMPLE
The following could appear in the .forward file in your home directory: (This assumes that your username is pickard) pickard, |"/usr/local/bin/mailsound" Here is a sample $HOME/.mailsounds file: Andrew.* -r Passing_Train riot arrp flinstones root.* out! daemon.* -v 220 sci_fi_fun MAILER.* -S 1000,10000 cuckoo pig Oomph *. pigs FILES
$HOME/.mailsounds SEE ALSO
rplay.conf(5), rplayd(1) AUTHOR
This program was written by Andrew Scherpbier at San Diego State University. He can be reached by E-mail as follows: Andrew@SDSU.Edu The mailsound program makes use of Mark Boyns' rplay package which can play multiple sounds on remote machines. He can be reached by E-mail as follows: boyns@sdsu.edu BUGS
The code does very little error checking. No range checking on any of the values is done. 11 August 1993 MAILSOUND(1)
All times are GMT -4. The time now is 09:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy