Hi everybody:
I try to print in new file selected lines from another file wich depends on the first column.
I have done a script like this:
lines=( "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "21" "31" "41" "51" "55" "57" "58" )
${lines}
for lines in ${lines}
do
awk -v ... (6 Replies)
Hi friends,
This is my very first post on forum, so kindly excuse if my doubts are found too silly.
I am trying to automate a piece of routine work and this is where I am stuck at the moment-I need to grep a particular ID through a file containing many records(which start with <LRECORD> and end... (6 Replies)
I am trying to print 1st, 2nd, 13th and 14th fields of a file of line numbers from 29 to 10029. I dont know how to put this in one code. Currently I am removing the selected lines by
awk 'NR==29,NR==10029' File1 > File2
and then doing
awk '{print $1, $2, $13, $14}' File2 > File3
Can... (3 Replies)
I need to extract selected lines from a log file, I can use grep to pull one line matching 'x' or matching 'y', how can I run through the log printing both matching lines in order top to bottom.
i.e
line 1 xyz - not needed
line 2 User01 - needed
line 3 123 - not needed
line 4 Info - needed... (2 Replies)
how to use "awk" to print any record has pattern not equal ? for example my file has 5 records & I need to get all lines which $1=10 or 20 , $2=10 or 20 and $3 greater than "130302" as it shown :
10 20 1303252348212B030
20 10 1303242348212B030
40 34 1303252348212B030
10 20 ... (14 Replies)
Using grep I can easily use:
cvs log |grep -iB 10 -A 10 'date: 2013-10-30'
to display search results and 10 lines before and after. How can this be accompished using gawk? (4 Replies)
Hi All,
I have a XML file which is looks like as below. <<please see the attachment >>
<?xml version="1.0" encoding="UTF-8"?>
<esites>
<esite>
<name>XXX.com</name>
<storeId>10001</storeId>
<module>
... (4 Replies)
The intended result should be :
PDF converters
'empty line'
gpdftext and pdftotext?xml version="1.0"?>
xml:space="preserve"><note-content version="0.1" xmlns:/tomboy/link" xmlns:size="http://beatniksoftware.com/tomboy/size">PDF converters
gpdftext and pdftotext</note-content>... (9 Replies)
Discussion started by: Klasform
9 Replies
LEARN ABOUT MOJAVE
editmap
editmap(1M) System Administration Commands editmap(1M)NAME
editmap - query and edit single records in database maps for sendmail
SYNOPSIS
editmap -C file [-N] [-f] [-q | -u | -x] maptype mapname key ["value"...]
DESCRIPTION
The editmap command queries or edits one record in a database maps used by the keyed map lookups in sendmail(1M). Arguments are passed on
the command line and output (for queries) is directed to standard output.
Depending on how it is compiled, editmap handles up to three different database formats, selected using the maptype parameter. See OPER-
ANDS.
If the TrustedUser option is set in the sendmail configuration file and editmap is invoked as root, the generated files are owned by the
specified TrustedUser.
OPTIONS
The following options are supported:
-C file Use the specified sendmail configuration file (file) to look up the TrustedUser option.
-f Disable the folding of all upper case letters in the key to lower case. Normally, all upper case letters in the key are
folded to upper case. This is intended to mesh with the -f flag in the K line in sendmail.cf. The value is never case
folded.
-N Include the null byte that terminates strings in the map (for alias maps).
-q Query the map for the specified key. If found, print value to standard output and exit with 0. If not found then print an
error message to stdout and exit with EX_UNAVAILABLE.
-u Update the record for key with value or inserts a new record if one doesn't exist. Exits with 0 on success or EX_IOERR on
failure.
-x Delete the specific key from the map. Exit with 0 on success or EX_IOERR on failure.
OPERANDS
The following operands are supported:
key The left hand side of a record.
Each record is of the form:
key value
key and value are separated by white space.
mapname File name of the database map being created.
maptype Specifies the database format. The following maptype parameters are available:
dbm Specifies DBM format maps.
btree Specifies B-Tree format maps.
hash Specifies hash format maps.
value The right hand side of a record.
Each record is of the form:
key value
key and value are separated by white space.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWsndmu |
+-----------------------------+-----------------------------+
SEE ALSO makemap(1M), sendmail(1M), attributes(5)SunOS 5.10 14 Sep 2001 editmap(1M)