I am trying to search a log for a particluar pattern listing the total # of occurences in the end.
I thought using a shell script for input then calling awk to search for the paramters specified. I want the script to be usable acorss envs.
Code:
#! /usr/bin/bash
# get the variables... (5 Replies)
Hi
I am trying to edit a csv file. Bacically I need to input a search variable and the value that must be changed in one of the fields corresponding to that searched variable.
My csv file looks like so:
1,1A,5
1,1B,2
1,1C,3
2,2A,7
2,2B,4
2,2C,0
3,3A,1
3,3B,6
3,3C,4
I want to... (4 Replies)
Hi guys,
Does awk have a built-in variable which I can use to display the input file it's currently reading?
I'm currently concatenating multiple files using awk and later on do some parsing. But for now, I want to add an extra column in the main output data file - basically putting in the... (3 Replies)
Hi,
I'm new with this stuff, but I hope you can help me.
This is what I'm trying to do:
for id in $var; do
awk '{if ($1 == $id) print $2}' merg_data.dat > neigh.tmp
done
I need that for every "id", awk search the first column of the file merg_data.dat which contains "id" and... (3 Replies)
I have a shell program that calls another shell program
the following code works
. chkTimeFormat.sh "10/9/12 17:51:19:783."|read c
but when I am passing the the time in a variable like in the code below, the shell chkTimeFormat.sh is not returning proper value
time="10/9/12... (9 Replies)
Hi All,
I am new to AWK programming. I have the following for loop in my awk program.
cat printhtml.awk:
BEGIN
-------- <some code here>
END{
----------<some code here>
for(N=0; N<H; N++)
{
for(M=5; M<D; M++) print "\t" D "";
}
-----
}
... (2 Replies)
I have a below syntax its working fine...
var12=$(ps -ef | grep apache | awk '{print $2,$4}')
Im getting expected output as below:
printf "%b\n" "${VAR12}"
dell 123
dell 456
dell 457
Now I wrote a while loop.. the output of VAR12 should be passed as input parameters to while loop and results... (5 Replies)
I have file called in in.txt contains with the below lines I want to display the lines between the value which I would be passing.
one
two
three
four
five
ten
six
seven
eight
Expected output if I have passed one and ten
two
three
four
five (8 Replies)
Dear UNIX forum members,
I am using macbook pro 13 (2015 edition) with MAC OS Mojave and am trying to write the shell script where when it is run through terminal it asks for an input (in the code below an input variable is domains) and then that input becomes capital letter or letters which... (3 Replies)
Discussion started by: Aurimas
3 Replies
LEARN ABOUT SUSE
tpage
TPAGE(1) User Contributed Perl Documentation TPAGE(1)NAME
Template::Tools::tpage - Process templates from command line
USAGE
tpage [ --define var=value ] file(s)
DESCRIPTION
The tpage script is a simple wrapper around the Template Toolkit processor. Files specified by name on the command line are processed in
turn by the template processor and the resulting output is sent to STDOUT and can be redirected accordingly. e.g.
tpage myfile > myfile.out
tpage header myfile footer > myfile.html
If no file names are specified on the command line then tpage will read STDIN for input.
The "--define" option can be used to set the values of template variables. e.g.
tpage --define author="Andy Wardley" skeleton.pm > MyModule.pm
See Template for general information about the Perl Template Toolkit and the template language and features.
AUTHOR
Andy Wardley <abw@wardley.org>
<http://wardley.org/>
VERSION
2.68, distributed as part of the Template Toolkit version 2.19, released on 27 April 2007.
COPYRIGHT
Copyright (C) 1996-2007 Andy Wardley. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
ttree
perl v5.12.1 2008-11-13 TPAGE(1)