grabbing filename from text file....should be easy!
Quick question...I'm trying to grab the .tif file name from this output from our fax server. What is the best way i can do this in a bash script? I have been looking at regular expressions with bash or using awk but having some trouble. thanks! The only output i want is 'cert375670-20100409-032044.tif'
Last edited by vgersh99; 04-09-2010 at 02:36 PM..
Reason: code tags, please!
Hi again. Sorry if it seems like I'm spamming the boards a bit, but I figured I might as well ask all the questions I need answers to at once, and hopefully at least get some.
I have installed Solaris 10 on a server. The default text editors are there (vi, ex, ed, maybe others, I know emacs is... (4 Replies)
Hello,
I got files full path in a text file like that
/main/k/kdelibs/kdelibs4c2a_3.5.10.dfsg.1-2ubuntu7_i386.deb
/main/k/kdelibs-experimental/libknotificationitem-dev_4.3.2-0ubuntu1_i386.deb
/main/k/kdemultimedia/dragonplayer_4.3.2-0ubuntu1_i386.deb... (13 Replies)
I have a collection of text files that comprise a mailing list archive. I grep them to find an email that interests me, then open the file in a text editor to find the surrounding paragraph of text. Is there an easy way to do this from the shell instead? (2 Replies)
Hi guys...Wow I just composed a huge post and it got erased as I was logged out automatically
Anyways I hope someone can help me out here.
So the task I'm working on is like this
I have a bunch of files that I care about sitting in a directory say $HOME/files
Now my job is to go and loop... (6 Replies)
Hello,
I am really stuck and I'm hoping somone can help. I have a text file that is similar to this:
<--First User-->
<function>account='uid=user1,.......
<--Second User-->
<function>account='uid=user2,.......What I want is to grab the usernames after "uid=" and before the following... (9 Replies)
If I have a txt file with
test.txt
somelineoftext
and I want to set that line of text to variable in a script:
so
#!/bin/bash
var=''
becomes
#!/bin/bash
var='somelineoftext' (3 Replies)
Hi,
I have a Report.txt file. Say the contents of this file are :
1 2 3 4 5 7 df v g gf
e r dfkf lsdk dslsdklsdk
Report Start: xxxxxxdad
asdffsdfsdfsdfasfasdffasdf
sadfasdfsadffsfsdf Report End.
sdfasdfasdf
sdfasfdasdfasdfasdfasdf
sadfasdfsdf
I need to grab from Report Start... (3 Replies)
I have a text file that shows the output of my solar inverters. I want to separate this into sections. overview , device 1 , device 2 , device 3. Each device has different number of lines. but they all have unique starting points. Overview starts with 6 #'s, Devices have 4#'s and their data starts... (6 Replies)
I am trying to use awk to place the contens of a filename in $1 and $2 followed by the data in the text file. Basically, put the filename within the text file. There are over 1000 files in the directory and as of now each file is saved with a unique name but it is not within the file. Thank you... (10 Replies)
I would like to grab complex html text between lines using variables. I am running Debian and using mksh shell.
Here is the part of the html that I want to extract from. I would like to extract the words 'to love,' and I would like to use the above and below lines as reference points.
... (3 Replies)
Discussion started by: bedtime
3 Replies
LEARN ABOUT SUSE
faxinfo
FAXINFO(8C)FAXINFO(8C)NAME
faxinfo - print information about a received facsimile
SYNOPSIS
Basic usage:
/usr/sbin/faxinfo [ -b ] [ -n ] [ -D ] file.tif [ file2.tif [...] ]
Formatting shortcuts:
/usr/sbin/faxinfo [ -C delim | -c delim | -r ] file.tif [ file2.tif ] ]
Raw formatting:
/usr/sbin/faxinfo [ -S fmt ] [ -s fmt ] [ -e fmt ] [ -E fmt ] file.tif [ file2.tif ] ]
DESCRIPTION
faxinfo prints descriptive information on the standard output about a received facsimile file. For example:
/var/spool/fax/recvq/fax00017.tif:
Sender: +14159657824
Pages: 3
Quality: Normal
Page: North American Letter
Received: 1996:01:19 13:51:02
TimeToRecv: 0:39
SignalRate: 14400 bit/s
DataFormat: 2-D MR
ErrCorrect: No
CallID1: 2152345678
CallID2: 1234
This information is typically included in the notification mail generated by the faxrcvd(8C) script when a facsimile is received by
HylaFAX.
-n suppresses the printing of the filename.
-b strips any leading directory of the filename before printing
-D prints the actual print strings being used for debug purposes
Formatting shortcuts:
-C delim
Sets the format to a quoted CSV, shortcut to
-S '"%s"' -s ',"' -e '"' -E '
'
-c delim
Sets the format to a CSV, shortcut to:
-S '%s' -s ',' -e '' -E '
'
-r Sets the format to raw values, shortcut to:
-S '' -s '' -e '0 -E ''
Raw formating:
-S fmt used to start each fax, it is passed one parameter, the fax file name
-s fmt used to start each field, it is passed one parameter, the field name
-e fmt used to end each field, it is passed one parameter, the field name
-E fmt used to end each fax, it is passed one parameter, the fax file name
NOTES
The information that faxinfo prints is obtained from the tags stored in the TIFF image that is written by the HylaFAX software. If faxinfo
is presented with an invalid TIFF image it may print uninteresting information. Similarly if a TIFF image that was not written by HylaFAX
is supplied as an argument then only partial information may be printed--this is because HylaFAX stores certain information in private tags
that other TIFF writers may not emit.
Use of the raw fmt options to allow you to directly control the print format strings used when formating the output. These format strings
are passed directly to printf, with basic <char> sequences being interpreted, including
,
, and , and can be used to make the fax-
info output conform to specific requirements, like peculiar CVS, tables, HTML, etc.
The order of the options is important. They are parsed from first to last, so any later options will override settings of previous ones.
ERRORS
faxinfo return 0 on success and 1 if the file passed as argument is not valid.
SEE ALSO hylafax-server(5F), faxrcvd(8C), faxgetty(8C)
November 15, 1996 FAXINFO(8C)