On an unrelated note, in case you are not aware, the following can be re-written ...
... by combining pattern alternatives with "|".
Note that I did not double-quote $3. There's nothing wrong with doing so, but it's not necessary. Double quotes only protect against field splitting and pathname expansion (file globbing), neither of which is performed on the word which follows "case".
Regards,
Alister
Thank you for yours advices.
But look with this magenta pattern. it doesn't work.
Have you an idea why ?
Hi,
I have file 1.txt with following entries as shown:
0152364|134444|10.20.30.40|015236433
0233654|122555|10.20.30.50|023365433
**
**
**
In file 2.txt I have the following entries as shown:
0152364|134444|10.20.30.40|015236433
0233654|122555|10.20.30.50|023365433... (4 Replies)
Hi all,
I'm looking for some help. I have a file (very long) that is organized like below:
>Cluster 0
0 283nt, >01_FRYJ6ZM12HMXZS... at +/99%
1 279nt, >01_FRYJ6ZM12HN12A... at +/99%
2 281nt, >01_FRYJ6ZM12HM4TS... at +/99%
3 283nt, >01_FRYJ6ZM12HM946... at +/99%
4 279nt,... (4 Replies)
wondering if anyone has any thoughts to convert the below thru a shell script
Convert decimal signalling point notation to ANSI point code notation
There is a site that does that conversion but i need to implement the solution in a shell script.....Thoughts....
OS: Solaris 9
... (4 Replies)
Hello,
I want to verify the format date like 2013-03-08 (YYYY-MM-DD)
It doesn't work because the pattern matching notation below returns false while the date is right.
Can you help me ? Thanks in advance
case "$6" in (-0-0 | -1-1 | -1-2 | -1-3)
# Nothing, OK !
;;
(*) echo 'Fatal,... (4 Replies)
Hello,
I want to simplify two commands into one.
1st command
$type_log_$instance.log.$date.0012nd command
$type_log.log.$date.tar.gzInto blue brackets, How do I do to replace the pattern by a blank or _$instance ?
$type_log?_$instance].log.$date.*Thank you. (13 Replies)
Hello
I have two kinds of logs like
server.logserver.log.2013-07-27.001i want to create a variable which look like this (with a pipe)
log_name=server.(log|log.$YYYY-MM-DD.)But i tried many cases but it didn't work.
Is it possible ? If yes, can you help me. (6 Replies)
hello folks,
I have few values in a log which are in scientific notation.
I am trying to convert into actual decimal format or integer but couldn't able to convert.
Values in scientific notation:
1.1662986666666665E-4
2.0946799999999998E-4
3.0741333333333333E-6
5.599999999999999E-7... (2 Replies)
'Hi
I'm using the following code to extract the lines(and redirect them to a txt file) after the pattern match. But the output is inclusive of the line with pattern match.
Which option is to be used to exclude the line containing the pattern?
sed -n '/Conn.*User/,$p' > consumers.txt (11 Replies)
The sample file:
dept1: user1,user2,user3
dept2: user4,user5,user6
dept3: user7,user8,user9
I want to match by '/^dept2.*/' but don't want to have substring 'dept2:' in output. How to compose such regex? (8 Replies)
Hi all!
Thanks for taking the time to view this!
I want to grep out all lines of a file that starts with pattern 1 but also does not match with the second pattern.
Example:
Drink a soda
Eat a banana
Eat multiple bananas
Drink an apple juice
Eat an apple
Eat multiple apples
I... (8 Replies)
Discussion started by: demmel
8 Replies
LEARN ABOUT LINUX
faxrcvd
FAXRCVD(8) System Manager's Manual FAXRCVD(8)NAME
faxrcvd - HylaFAX notification script for received facsimile
SYNOPSIS
/var/spool/hylafax/bin/faxrcvd qfile devid commid error-msg [ callid-1 [ callid-2 [ ... [ callid-n ] ] ] ]
DESCRIPTION
bin/faxrcvd is the command script invoked by the facsimile server whenever a facsimile is received. The default script sends electronic
mail to the FaxMaster user describing the content of the facsimile and other useful information such as the time spent receiving the docu-
ment. The arguments are:
qfile the pathname of the received TIFF file relative to the root of the spooling hierarchy.
devid the modem device on which the facsimile was received.
commid the communication identifier for the inbound call.
error-msg an error message that is non-null if an error was encountered during the receive operation.
callid the value of various identification indicators from the call
NOTES
This script can route facsimile directly to the intended recipient. To do this create a shell script etc/FaxDispatch in the spooling area
that sets SENDTO to the receiver's electronic mail address. For example,
case "$SENDER" in
*1*510*526*1212*) SENDTO=sam;; # Sam's test rig in Berkeley
*1*415*390*1212*) SENDTO=raster@asd;; # 7L Xerox room, used for scanning
*5107811212) SENDTO=peebles@mti;; # stuff from home
esac
case "$DEVICE" in
ttyS1) SENDTO=john;; # all faxes received on ttyS1
ttyLT0) SENDTO=mary@home;; # all faxes received on ttyLT0
esac
case "$CIDNUMBER" in
435*) SENDTO=lee; FILETYPE=pdf;; # all faxes from area code 435
5059627777) SENDTO=amy; FILETYPE=tif;; # Amy wants faxes in TIFF
esac
case "$SUBADDR" in
53) SENDTO=FaxMaster;; # without double-notification
roger) SENDTO=roger;; # possible text subaddressing
esac
Note that you must match any embedded white space. The facsimile will be sent as a MIME-encoded PostScript document as default.
CALLIDn
is equivalent to the nth call identification parameter
CIDNAME
is equivalent to CALLID2 above.
CIDNUMBER
is equivalent to CALLID1 above.
DEVICE is equivalent to device above.
FILETYPE
controls the filetype of the image attachment. Current filetype options are ``ps'', ``tif'', and ``pdf''. Multiple values may be
specified by separating them with whitespace. In that case a separate attachment is created for each filetype.
FROMADDR
controls the sender of the received fax notification. It is given as an e-mail address.
MSG is equivalent to error-msg above.
NOTIFY_FAXMASTER
(an underscore ``_'' character is between NOTIFY and FAXMASTER) indicates whether or not the HylaFAX administrator should be noti-
fied regarding incoming facsimile. Default is ``always''. Also available are ``never'', which means to never send any received
facsimile notification, and ``errors'', which means to send notification only if there were reception errors.
SENDER is the received TSI of the fax sender.
SENDTO controls the recipient of the received fax notification. It is given as an e-mail address, and it's value will be passed directly
to the MTA for delivery as well as being inserted into the email. If you want to send to multiple receipients in seperate messages
set the variable SENDTO1...SENDTOn in addition to SENDTO. faxrcvd will process additional SENDTOn variables starting at 1, and
stopping at the first empty SENDTOn variable it finds. The templates should continue to reference $SENDTO, and faxrcvd will make
sure it get's set correctly as the template is processed for each one.
SUBADDR
the received subaddress value, communicated by the sender for post-reception routing purposes
TEMPLATE
the template subdirectory to use when sending e-mails. HylaFAX ships with a base set of templates, and some direct translations.
To use the German translated templates, set TEMPLATE=de in FaxDispatch. This is relative to the base template directory.
Other shell variables are available. Consult the faxrcvd script directly.
FILES
/var/spool/hylafax spooling area
/usr/sbin/faxinfo for printing information about the facsimile
/usr/bin/fax2ps for converting TIFF to PostScript
/usr/lib/sendmail for delivering mail
/var/spool/hylafax/etc/templates/ base directory for outgoing e-mail templates
SEE ALSO faxd(8), hylafax-server(5), recvq(5)
May 28, 2001 FAXRCVD(8)