I'm trying to use awk to extract certain text from a file. The file looks like this:
Now what I want to extract is the list of numbers (without the search text printed) that occur between "Start" and <some word>. The catch is that <some word> isn't always the same word!
I've gotten close with an awk script that looks like this:
This gives me exactly what I want, provided that <some word> happens to be "End" - problem is that it could be something else. The only sure thing is that it's some kind of letter. So I need to replace /End/ with some kind of variable that says to search between "Start" and the next time a letter A..Z is found.
I thought it should be fairly straightforward but I can't find a way (searched the boards). I'm not looking for anything too elaborate, so please don't spend too much time with complicated code! I have a workaround - just would like to see if there is a cleaner way to do it!
Hi all,
I have a file with lines written somewhat like this.
aaaa
ccc
aa
linux
browse = no
xssxw
cdcedc
dcsdcd
csdw
police
dwed
dwd
browse = no
cdecec (2 Replies)
Hi Everyone,
I am looking for a simple way for replacing all the files under a directory that use the server "xsgd1234dap" with "xsdr3423pap".
For Example:
In the Directory,
$pwd
/home/nick
$ grep -l "xsgd1234dap" *.sh | wc -l
119
I have "119" files that are still using... (5 Replies)
I have a file that has the words I want to find in other files (but lets say I just want to find my words in a single file). Those words are IDs, so if my word is ZZZ4, outputs like aaZZZ4, ZZZ4bb, aaZZZ4bb, ZZ4, ZZZ, ZyZ4, ZZZ4.8 (or anything like that) WON'T BE USEFUL.
I need the whole word... (6 Replies)
hi all, I'm new there, I'm just playing with perl and lwp and I just successfully created a script for log in to a web site with post. I have a response but I would like to have something like this:
I have in my response lines like:
<div class="sender">mimi020</div>
<some html code.....>... (3 Replies)
i have a script that scans a log file every 10 minutes. this script remembers the last line of the log and then uses it to continue monitoring the log when it runs again 10 minutes later.
the script searches the log for a string called MaxClients.
now, how can i make it so that when the... (7 Replies)
Hi below is the input file, i need to find repeated words and sum up the values of it which is second field from the repeated work.Im trying but getting no where close to it.Kindly give me a hint on how to go about it
Input
fruits,apple,20,fruits,mango,20,veg,carrot,12,veg,raddish,30... (11 Replies)
Hi All,
I have a XML file which is looks like as below. <<please see the attachment >>
<?xml version="1.0" encoding="UTF-8"?>
<esites>
<esite>
<name>XXX.com</name>
<storeId>10001</storeId>
<module>
... (4 Replies)
I have a file: file.txt, which contains the following data in it.
This is a file, my name is Karl, what is this process, karl is karl junior, file is a test file, file's name is file.txt
My name is not Karl, my name is Karl Joey
What is your name?
Do you know your name and... (3 Replies)
Hi All,
I am looking for a perl/awk/sed command to auto-increment the numbers line in file, P1.tcl:
run_build_model sparc_ifu_dec
run_drc
set_faults -model path_delay -atpg_effectiveness -fault_coverage
add_delay_paths P1
set_atpg -abort_limit 1000
run_atpg -ndetects 1000
I would like... (6 Replies)
I have a multicolumn text file with header in the first row like this
The headers are stored in an array called . which contains I want to search for each elements of this array from that multicolumn text file. And I am using this awk approach
for ii in ${hdr}
do
gawk -vcol="$ii" -F... (1 Reply)
Discussion started by: Atta
1 Replies
LEARN ABOUT CENTOS
papi_get_executable_info
PAPI_get_executable_info(3) PAPI PAPI_get_executable_info(3)NAME
PAPI_get_executable_info -
Get the executable's address space info.
SYNOPSIS Detailed Description
@par C Interface:
const PAPI_exe_info_t *PAPI_get_executable_info( void );
This function returns a pointer to a structure containing information
about the current program.
@param fullname
Fully qualified path + filename of the executable.
@param name
Filename of the executable with no path information.
@param text_start, text_end
Start and End addresses of program text segment.
@param data_start, data_end
Start and End addresses of program data segment.
@param bss_start, bss_end
Start and End addresses of program bss segment.
@retval PAPI_EINVAL
One or more of the arguments is invalid.
@par Examples:
* const PAPI_exe_info_t *prginfo = NULL;
* if ( ( prginfo = PAPI_get_executable_info( ) ) == NULL )
* exit( 1 );
* printf( "Path+Program: %s0, exeinfo->fullname );
* printf( "Program: %s0, exeinfo->address_info.name );
* printf( "Text start: %p, Text end: %p0, exeinfo->address_info.text_start, exeinfo->address_info.text_end) ;
* printf( "Data start: %p, Data end: %p0, exeinfo->address_info.data_start, exeinfo->address_info.data_end );
* printf( "Bss start: %p, Bss end: %p0, exeinfo->address_info.bss_start, exeinfo->address_info.bss_end );
*
See Also:
PAPI_get_opt
PAPI_get_hardware_info
PAPI_exe_info_t
Author
Generated automatically by Doxygen for PAPI from the source code.
Version 5.2.0.0 Tue Jun 17 2014 PAPI_get_executable_info(3)