06-05-2016
Moderator's Comments:
|
|
This thread appears to be a duplicate of a portion of the thread Find keywords in multiple log files.
The posts in this thread will be copied or moved there.
Continue any further discussion on this topic in that thread.
This thread is closed.
|
|
This User Gave Thanks to Don Cragun For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I got a file with contents are of the following format
...
2007-09-28 ./.passwwd1.sh.swp
2007-11-26 ./827-55.jpg
2007-09-28 ./argcheck.pl
...
I have to delete all the '-' in the "first field", ie. the date, not on the second field, which is the name of the file.
i.e.
required output
... (1 Reply)
Discussion started by: jaduks
1 Replies
2. Shell Programming and Scripting
Hi,
first, I have searched in the forum for this, but I could not find the right answer. (There were some similar threads, but I was not sure how to adapt the ideas.)
Anyway, I have a quite natural problem: Given are several text files. All files contain the same number of lines and the same... (3 Replies)
Discussion started by: rbredereck
3 Replies
3. Shell Programming and Scripting
Hi all.
I have the following command that is successfully searching for any one of the strings on all lines of a file and replacing it with the instructed value.
cat inputFile | awk '{gsub(/aaa|bbb|ccc|ddd/,"1234")}1' > outputFile
This does in fact replace any occurrence of aaa, bbb,... (2 Replies)
Discussion started by: dazhoop
2 Replies
4. Shell Programming and Scripting
Hello,
For the input file, I am trying to split those records which have multiple values seperated by '|' in the last input field, into multiple records and each record corresponds to the common input fields + one of the value from the last field.
I was trying with an example on this forum... (4 Replies)
Discussion started by: imtiaz99
4 Replies
5. Shell Programming and Scripting
Hi,
I am trying to execute this line
awk -F ";" -v OFS=";" '{gsub(/\./,",",$6); print}' FILE
but for multiple fields $6 $7 $8
Do you have a suggstion?
Tried:
awk -F ";" -v OFS="";"" "function GSUB( F ) {gsub(/\./,\",\",$F); print} { GSUB( 6 ); GSUB( 7 ); GSUB( 8 ) } 1"... (2 Replies)
Discussion started by: nakaedu
2 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I am using the following code to change NA to X in only the 5th column of my text file:
awk '{gsub("NA","x",$5)}1' in.file > out.file
How can I modify this code if I want to change NA to X in multiple columns of the text file (i.e. columns 5,6 and 7). Thanks! (2 Replies)
Discussion started by: evelibertine
2 Replies
7. Shell Programming and Scripting
Hi,
I have a huge file that has data something like shown below:
huge_file.txt
start regexp
Name=Name1
Title=Analyst
Address=Address1
Department=Finance
end regexp
some text
some text
start regexp
Name=Name2
Title=Controller
Address=Address2
Department=Finance
end regexp (7 Replies)
Discussion started by: r3d3
7 Replies
8. Shell Programming and Scripting
I'm trying to use awk to do the following. I have file1 with many lines, each containing 5 fields describing an individual set. I have file2 which is a template config file with variable space holders to be replaced by the values in file1. I would like to substitute each set of values in file1 with... (6 Replies)
Discussion started by: msmehaffey
6 Replies
9. Shell Programming and Scripting
I have a file containing multiple values, some of them are pipe separated which are to be read as separate values and some of them are single value all are these need to store in variables.
I need to read this file which is an input to my script
Config.txt
file name, first path, second... (7 Replies)
Discussion started by: ketanraut
7 Replies
10. UNIX for Dummies Questions & Answers
I have several problems with my problems: I hope you can help me.
1) the If else statement I am getting an error message. My syntax must be incorrect because the entire statement is throwing an error.
For example in filew.log if these items don't exist Memsize, SASFoundation and also if... (0 Replies)
Discussion started by: dellanicholson
0 Replies
LEARN ABOUT DEBIAN
font::ttf::gsub
Font::TTF::GSUB(3pm) User Contributed Perl Documentation Font::TTF::GSUB(3pm)
NAME
Font::TTF::GSUB - Module support for the GSUB table in conjunction with TTOpen
DESCRIPTION
Handles the GSUB subtables in relation to Ttopen tables. Due to the variety of different lookup types, the data structures are not all that
straightforward, although I have tried to make life easy for myself when using this!
INSTANCE VARIABLES
The structure of a GSUB table is the same as that given in Font::TTF::Ttopen. Here we give some of the semantics specific to GSUB lookups.
ACTION_TYPE
This is a string taking one of 4 values indicating the nature of the information in the ACTION array of the rule:
g The action contains a string of glyphs to replace the match string by
l The action array contains a list of offsets and lookups to run, in order, on the matched string
a The action array is an unordered set of optional replacements for the matched glyph. The application should make the selection
somehow.
o The action array is empty (in fact there is no rule array for this type of rule) and the ADJUST value should be added to the
glyph id to find the replacement glyph id value
MATCH_TYPE
This indicates which type of information the various MATCH arrays (MATCH, PRE, POST) hold in the rule:
g The array holds a string of glyph ids which should match exactly
c The array holds a sequence of class definitions which each glyph should correspondingly match to
o The array holds offsets to coverage tables
CORRESPONDANCE TO LAYOUT TYPES
The following table gives the values for ACTION_TYPE and MATCH_TYPE for each of the 11 different lookup types found in the GSUB table
definition I have:
1.1 1.2 2 3 4 5.1 5.2 5.3 6.1 6.2 6.3
ACTION_TYPE o g g a g l l l l l l
MATCH_TYPE g g c o g c o
Hopefully, the rest of the uses of the variables should make sense from this table.
METHODS
$t->read_sub($fh, $lookup, $index)
Asked by the superclass to read in from the given file the indexth subtable from lookup number lookup. The file is positioned ready for the
read.
$t->extension
Returns the table type number for the extension table
$t->out_sub($fh, $lookup, $index)
Passed the filehandle to output to, suitably positioned, the lookup and subtable index, this function outputs the subtable to $fh at that
point.
AUTHOR
Martin Hosken Martin_Hosken@sil.org. See Font::TTF::Font for copyright and licensing.
perl v5.10.1 2009-06-06 Font::TTF::GSUB(3pm)