Hi,
I have an awk script which performs simple operations of variable assignments and finally printing the variables in custom form.
BEGIN {FS=OFS="\n"}
{
v1=substr($0,1,15)
v2=substr($0,16,200)
v3=substr($0,216,20)
print v1 "|" v2 "|" v3
}
The input file being processed... (2 Replies)
Guys i have strange behaviour with command output being saved in a variable instead of a tmp file.
1. I suck command output into a variable
Sample command output
# cleanstats
DRIVE INFO:
----------
Drv Type Mount Time Frequency Last Cleaned Comment
*** ****... (1 Reply)
hi,
just wanted to make a shortcut of this one
a="a b c"
b=`echo $a | awk '{print $2}'`
echo "the middle is $b"
why can't i do this:
a="a b c"
echo "the middle is ${`echo $a | awk '{print $2}'`}" <- bad substitution :wall:
thanks (6 Replies)
Hi All,
I am using an awk script as below:
awk -F'|' 'BEGIN{OFS="|";} { if ($1==$3 && $3==$7 && $7==$13 && $2==$6 && $6==$11 && $15-$14+1==$11) print $0"|""TRUE"; else print $0"|""FALSE"; }' tempfile.txt
In above script, all conditions are being checked except the one which is... (4 Replies)
I have a file of the form.
16:00:26,83.33 16:05:26,83.33 16:10:26,83.33 16:15:26,83.33 16:20:26,90.26 16:25:26,83.33 16:30:26,83.33 17:00:26,83.33 17:05:26,83.33 17:10:26,83.33 17:15:26,83.33 17:20:26,90.26 17:25:26,83.33 17:30:26,83.33
For the timestamp 16:00:00 to 16:55:00, I need to... (5 Replies)
Dear all,
In my working directory I have two files as:
$ ls -ltr
-rw-r--r-- 1 emily af-cms 7 30. Jul 09:56 L1File1_000_981.root
-rw-r--r-- 1 emily af-cms 10 30. Jul 09:56 L1File2_000_980.root
I want to have the OutputFile.txt with the following content:
L1File1_000_981.root... (6 Replies)
(I am using bash)
I have a command that will find the line number in a file by searching for a string where it exists.
linenumber=$(grep -n "string" $FILENAME | cut -d : -fi)
This returns the line number and removes the string. Now that I have the line number I want to subtract 4 from it and... (5 Replies)
Hi, awk seem to be acting differently in Unix and Linux when it comes to formatting. This is making it difficult to migrate scripts.
for example:
UNIX:
echo "123" |awk '{printf ("%05s\n" ,$1)}'
00123
echo "123" |awk '{printf ("%05d\n" ,$1)}'
00123
echo "S12" |awk '{printf ("%05s\n"... (9 Replies)
Need your help in solving this puzzle. Any kind of help will be appreciated and link for any documents to read and learn and to deal with such scenarios would be helpful
Concatenate column1 and column2 of file 1. Then check for the concatenated value in Column1 of File2. If found extract the... (14 Replies)
Discussion started by: as7951
14 Replies
LEARN ABOUT DEBIAN
fst-mor
fst-mor(1) fst-mor fst-mor(1)NAME
fst-mor - Interactive morphological analyser and generator
SYNOPSIS
fst-mor [options] file
OPTIONS -n Print multi-character symbols without the enclosing angle brackets.
-h Print usage information.
DESCRIPTION
fst-mor is an interactive morphological analyser and generator. The argument is the name of a file which was generated by fst-compiler
(without using option -c).
fst-mor reads the transducer which is stored in the argument file and prompts the user for input. Each input line is processed until the
user enters "q" which ends the program.
fst-mor has two modes, an analysis mode (default) and a generation mode. Entering an empty input line switches between the two modes.
In order to explain what the program does in generation and analysis, consider the following transducer:
a b:x c:<> d
In generation mode, the program will print "axd" if the user enters "abcd" and "no result" otherwise. In other words, the program maps the
left symbols to the right symbols of the transducer.
In analysis mode, the program will print "abcd" if the user enters "axd" and "no result" otherwise.
BUGS
No bugs are known so far.
SEE ALSO
fst-compiler
AUTHOR
Helmut Schmid, Institute for Computational Linguistics, University of Stuttgart, Email: schmid@ims.uni-stuttgart.de, This software is
available under the GNU Public License.
February 2002 fst-mor(1)