Hi,
$ echo "Hellooo" | gawk '{print gensub(/o{3}/, "z", 1)}'
doesn't return "Hellz" as expected while:
$ echo "Hellooo" | awk '{print gensub(/o+/, "z", 1)}' produces "Hellz" correctly. Are the {m,n} quantifiers not supported in gensub?
I know that sub or gsub could do the job. It's just an... (2 Replies)
Actually I got a list of file end with *.txt
I want to use the same command apply to all the *.txt
Thus I try to find out the fastest way to write those same command in a script and then want to let them run automatics.
For example:
I got the file below:
file1.txt
file2.txt
file3.txt... (4 Replies)
Hi Experts,
I am adding a column of numbers with awk , however not getting correct output:
# awk '{sum+=$1} END {print sum}' datafile
2.15291e+06
How can I getthe output like : 2152910
Thank you..
# awk '{sum+=$1} END {print sum}' datafile
2.15079e+06 (3 Replies)
Hi
I have many problems with a script. I have a script that formats a text file but always prints the same error when i try to execute it
The code is that:
{
if (NF==17){
print $0
}else{
fields=NF;
all=$0;
while... (2 Replies)
Hi,
I have a situation to compare one file, say file1.txt with a set of files in directory.The directory contains more than 100 files.
To be more precise, the requirement is to compare the first field of file1.txt with the first field in all the files in the directory.The files in the... (10 Replies)
Hello experts,
I'm stuck with this script for three days now. Here's what i need.
I need to split a large delimited (,) file into 2 files based on the value present in the last field.
Samp: Something.csv
bca,adc,asdf,123,12C
bca,adc,asdf,123,13C
def,adc,asdf,123,12A
I need this split... (6 Replies)
Hi
I have strings like these :
Vengeance mitt
Men Vengeance gloves
Women Quatro Windstopper Etip gloves
Quatro Windstopper Etip gloves
Girls Thermobite hooded jacket
Thermobite Triclimate snow jacket
Boys Thermobite Triclimate snow jacket
and I would like to get the lower case words at... (2 Replies)
Good evening, Im newbie at unix specially with awk
From an scheduler program called Autosys i want to extract some data reading an inputfile that comprises jobs names, then formating the output to columns for example
1.
This is the inputfile:
$ more MapaRep.txt
ds_extra_nikira_usuarios... (18 Replies)
Hi All,
Thanks for answering my previous question. Could you please explain the highlighted code?
awk -v pos='9 27 39 54 59 64 71 78 83 103 108' 'BEGIN{split(pos,var)} {for (i in var) $0=gensub(/./,"|",var)} 1' test.txt | head
I understood that the split function splits the pos string into... (2 Replies)
Discussion started by: mrcool4
2 Replies
LEARN ABOUT FREEBSD
addftinfo
ADDFTINFO(1) General Commands Manual ADDFTINFO(1)NAME
addftinfo - add information to troff font files for use with groff
SYNOPSIS
addftinfo [ -v ] [ -param value... ] res unitwidth font
DESCRIPTION
addftinfo reads a troff font file and adds some additional font-metric information that is used by the groff system. The font file with
the information added is written on the standard output. The information added is guessed using some parametric information about the font
and assumptions about the traditional troff names for characters. The main information added is the heights and depths of characters. The
res and unitwidth arguments should be the same as the corresponding parameters in the DESC file; font is the name of the file describing
the font; if font ends with I the font will be assumed to be italic.
OPTIONS -v prints the version number.
All other options changes one of the parameters that is used to derive the heights and depths. Like the existing quantities in the font
file, each value is in inches/res for a font whose point size is unitwidth. param must be one of:
x-height
The height of lowercase letters without ascenders such as x.
fig-height
The height of figures (digits).
asc-height
The height of characters with ascenders, such as b, d or l.
body-height
The height of characters such as parentheses.
cap-height
The height of uppercase letters such as A.
comma-depth
The depth of a comma.
desc-depth
The depth of characters with descenders, such as p,q, or y.
body-depth
The depth of characters such as parentheses.
addftinfo makes no attempt to use the specified parameters to guess the unspecified parameters. If a parameter is not specified the
default will be used. The defaults are chosen to have the reasonable values for a Times font.
SEE ALSO groff_font(5), groff(1), groff_char(7)Groff Version 1.19.2 23 March 2013 ADDFTINFO(1)