redirect an awk string output to a script input with pipes
Hi,
I have a function in a bash script that returns a string after some operations using awk.
The following code returns 555
this value I'd like to pass it as a second argument of another script with the following usage
I'm trying to pass the second argument using a pipe but it does not work, no idea why not
Can anyone help me?
many thanks,
rid
i have a file (kk.log) in which following contents are there:
=====================================
Enter:YOU HAVE ENTERED : a
TestCase: TC1226677371 IS PASSED
2009-02-25 13:57:33.444 INFO com.t.t.exporterporter - Initialising Xml Exporter....
2009-02-25 13:57:33.445 INFO ... (2 Replies)
Hi,
i am new to awk. I am using csv2pipe script(shown below)
BEGIN { FS=SUBSEP; OFS="|" }
{
result = setcsv($0, ",")
print
}
# setcsv(str, sep) - parse CSV (MS specification) input
# str, the string to be parsed. (Most likely $0.)
# sep, the separator between the values.
#
#... (6 Replies)
Dear All:
I am trying to do something that (I thought) was relatively straightforward, but my code snippet does not seem to work.
Any suggestions?
Thank you
Sincerely yours
Misha Koshelev
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include... (0 Replies)
Hi All,
Sorry if the title is not good but I did not know how to explain with only some words!
What I meant is: I have a unix command built from a private application vendor that when executed it prompts for two entries by the keyboard, let's say, for example:
... (1 Reply)
Below script perfectly works, giving below mail output. BUT, I want to make the script mail only if there are any D-Defined/T-Transition/B-Broken State WPARs and also to copy the output generated during monitoring to a temporary log file, which gets cleaned up every week. Need suggestions.
... (4 Replies)
Hi Guys,
I want to redirect the output of 3 scripts to a file and then mail the output of those three scripts.
I used below but it is not working:
OFILE=/home/home1/report1
echo "report1 details" > $OFILE
=/home/home1/1.sh > $OFILE
echo... (7 Replies)
Hi,
I need to redirect the output of the file until the first instance of a string is found.
So in the filename output.txt i was to redirect everything from the start to where i find this string "BEA-000377" is found to a new file called output_new.txt
Sample output.txt
the controller... (1 Reply)
Hi,
I want to compare a value from test file and redirect the o/p value to the same file
input file
250 32000 32 128
Below is my code
awk '{ if ($1 < "300") print $1 > /tmp/test}' test
want to compare 250 < 300 then print 300 to the same place
below is the... (24 Replies)
Discussion started by: stew
24 Replies
LEARN ABOUT DEBIAN
yapp
YAPP(1p) User Contributed Perl Documentation YAPP(1p)NAME
yapp - A perl frontend to the Parse::Yapp module
SYNOPSYS
yapp [options] grammar[.yp]
yapp -V
yapp -h
DESCRIPTION
yapp is a frontend to the Parse::Yapp module, which lets you compile Parse::Yapp grammar input files into Perl LALR(1) OO parser modules.
OPTIONS
Options, as of today, are all optionals :-)
-v Creates a file grammar.output describing your parser. It will show you a summary of conflicts, rules, the DFA (Deterministic Finite
Automaton) states and overall usage of the parser.
-s Create a standalone module in which the driver is included. Note that if you have more than one parser module called from a program,
to have it standalone, you need this option only for one of your parser module.
-n Disable source file line numbering embedded in your parser module. I don't know why one should need it, but it's there.
-m module
Gives your parser module the package name (or name space or module name or class name or whatever-you-call-it) of module. It defaults
to grammar
-o outfile
The compiled output file will be named outfile for your parser module. It defaults to grammar.pm or, if you specified the option -m
A::Module::Name (see below), to Name.pm.
-t filename
The -t filename option allows you to specify a file which should be used as template for generating the parser output. The default is
to use the internal template defined in Parse::Yapp::Output.pm. For how to write your own template and which substitutions are
available, have a look to the module Parse::Yapp::Output.pm : it should be obvious.
-b shebang
If you work on systems that understand so called shebangs, and your generated parser is directly an executable script, you can specifie
one with the -b option, ie:
yapp -b '/usr/local/bin/perl -w' -o myscript.pl myscript.yp
This will output a file called myscript.pl whose very first line is:
#!/usr/local/bin/perl -w
The argument is mandatory, but if you specify an empty string, the value of $Config{perlpath} will be used instead.
grammar
The input grammar file. If no suffix is given, and the file does not exists, an attempt to open the file with a suffix of .yp is tried
before exiting.
-V Display current version of Parse::Yapp and gracefully exits.
-h Display the usage screen.
BUGS
None known now :-)
AUTHOR
Francois Desarmenien <francois@fdesar.net>
COPYRIGHT
(c) Copyright 1998-1999 Francois Desarmenien, all rights reserved. See Parse::Yapp(3) for legal use and distribution rights
SEE ALSO Parse::Yapp(3)Perl(1)yacc(1)bison(1)perl v5.10.1 2001-02-11 YAPP(1p)