Hi!
How can I print out a specific range of rows, like "cat file | awk NR==5,NR==9", but in the END-statement?
I have a small awk-script that finds specific rows in a file and saves the line number in an array, like this:
awk '
BEGIN { count=0}
/ZZZZ/ {
list=NR
... (10 Replies)
Hi,
I want to echo the 15th line from a file named as abc.txt, also i want to echo only the values in that line not the line number.
Thanks in advance:) (4 Replies)
hi all
I would like to help me find the problem with this script to find and print to the screen a specific date of a log file that I have on my server, the date it is received as the first argument in the script $ 1
Here I show you a few lines that made the idea of my log file:
****... (4 Replies)
Is it possible to modify file like this.
1. Remove all the duplicate names in a define column i.e 4th col
2. Count the no.of unique names separated by ";" and print as a 5th col
thanx in advance!!
Q
input
c1 30 3 Eh2
c10 96 3 Frp
c41 396 3 Ua5;Lop;Kol;Kol
c62 2 30 Fmp;Fmp;Fmp
... (5 Replies)
Hello,
i need help with awk.
I have this file:
cat number
DirB port 67 er_enc_out 0 er_bad_os 0
DirB port 71 er_enc_out 56 er_bad_os 0
DirB port 74 er_enc_out 0 er_bad_os 0
DirB port 75 ... (4 Replies)
Hello, I have the following input data:
A C
AA GG
A G
CG AG
the code I tried:
awk -F" " '{ if ((length($1==1) && (length($2==1))) input_file
is not working, I need the output to be (such that only the columns containing one letter are printed)
A C
A G
Any help would be appreciated! (5 Replies)
I want to print specific range of rows and then its columns using awk command.
lets say if a file contain 15 line then i need to print line 5 to 9.
awk '{print;for( NR>=5&&NR<=9); do; print "<tr>\n<td>"$1"</td><td>"$2"</td><td>"$3"</td>\n</tr" done}' xyz.csv
not sure what's wrong... (9 Replies)
I have input file as below I need to check for a pattern and if it is there in file then I need to print all the lines below BEGIN and END keyword. Could you please help me how to get this in AIX using sed or awk.
Input file:
ABC
******** BEGIN *****
My name is Amit.
I am learning unix.... (8 Replies)
In the below awk I am trying to print expName only if another tag planExecuted is true. In addition to the expName I am also printing planShortID. For some reason the word experiment gets printed so I remove it with sed. I have attached the complete index.html as well as included a sample of it... (1 Reply)
Discussion started by: cmccabe
1 Replies
LEARN ABOUT DEBIAN
coro::specific
Specific(3pm) User Contributed Perl Documentation Specific(3pm)NAME
Coro::Specific - manage coroutine-specific variables.
SYNOPSIS
use Coro::Specific;
my $ref = new Coro::Specific;
$$ref = 5;
print $$ref;
DESCRIPTION
This module can be used to create variables (or better: references to them) that are specific to the currently executing coroutine. This
module does not automatically load the Coro module (so the overhead will be small when no coroutines are used).
A much faster method is to store extra keys into %$Coro::current - all you have to do is to make sure that the key is unique (e.g. by
prefixing it with your module name). You can even store data there before loading the Coro module - when Coro is loaded, the keys stored in
%$Coro::current are automatically attached to the coro thread executing the main program.
You don't have to load "Coro::Specific" manually, it will be loaded automatically when you "use Coro" and call the "new" constructor.
new Create a new coroutine-specific scalar and return a reference to it. The scalar is guarenteed to be "undef". Once such a scalar has
been allocated you cannot deallocate it (yet), so allocate only when you must.
BUGS
The actual coroutine specific values do not automatically get destroyed when the Coro::Specific object gets destroyed.
AUTHOR
Marc Lehmann <schmorp@schmorp.de>
http://home.schmorp.de/
perl v5.14.2 2012-04-13 Specific(3pm)