So my program is not working and I keep changing it to figure out why. So I have two questions, can I do tracing similar to bash, and also what is wrong with this.
The idea is simple, I want to count "word" lengths, with the loose definition of word not being a space, tab, or newline. Here is what I wrote to test if it is counting words by outputting the number of 3 letter words, but it always gives 0.
I havent done shell scripting in quite some time. I want to know how to count the number of characters in a word, specifically a parameter.
Example: myscript hello
I want "myscript" to return the number of charcaters in the parameter "hello".
Any ideas? (9 Replies)
hi,
given a file
i need to get the first line and secodn line
and count each of the line whether the length of first line and second line is the same
i don;t know how to get the length of the line...seems like use 'wc' cannot do it...
please advice (1 Reply)
hi iam trying to do a specified word count on file
called text
i have a few ideas but don't get the result i want
do any one have a idea
please help
i have this at the moment
cat text
echo "Please enter the word you are looking for:"
read string
echo "the word < $string > occurs in... (5 Replies)
Hi All,
Please let me know how to get the count of a particular word in a file. Example. I am looking for count of word 'result' in a file abc.xml.
Thanks,
Shankar (10 Replies)
Hi all, I am trying to write a command that can help me count the number of lines in the /etc/passwd file ending in bash.
I have read through other threads but am yet to find one indicating how to locate a specifc word at the end of a line. I know i will need to use the wc command but when i... (8 Replies)
Script that lists all words used in one or more files and displays their count (pattern /\W+/ to split the lines of the input file into words can b used)..
It should display list in format word:count...gets Filename as an cmd line argument!
eg: $perl test doc (where doc is d file we are going to... (4 Replies)
Hi,
I need to count the lines of a file stack.html and if the amount lines i want to do something.
At this moment, I have
if ;
then ...
This is not working. Any ideas?
Thanks! (3 Replies)
I need to read a trigger file whose name can be:
ABC!DEF@2014.txt
or
ABC!DEF@2014,2015.txt
and then carry out functions on those inputs.
Currently I am doing:
YEAREXPORT {
FILE= xyz.txt
ls ABC* -l > ${FILE}
if ; then
log_err "Trigger File ABC* does not exist!"
fi (4 Replies)
I am trying to figure out to find word count of each word from my file
sample file
hi how are you
hi are you ok
sample out put
hi 1
how 1
are 1
you 1
hi 1
are 1
you 1
ok 1
wc -l filename is not helping , i think we will have to split the lines and count and then print and also... (4 Replies)
Discussion started by: mirwasim
4 Replies
LEARN ABOUT HPUX
elf64_newphdr
elf_getphdr(3E)elf_getphdr(3E)NAME
elf32_getphdr, elf32_newphdr, elf64_getphdr, elf64_newphdr - retrieve class-dependent program header table for elf32 and elf64 files,
respectively
SYNOPSIS
[flag... ] file... [library] ...
DESCRIPTION
For a 32-bit class file, returns a pointer to the program execution header table, if one is available for the ELF descriptor elf.
allocates a new table with count entries, regardless of whether one existed previously, and sets the bit for the table (see elf_flag(3E)).
Specifying a zero count deletes an existing table. Note this behavior differs from that of (see elf_getehdr(3E)), allowing a program to
replace or delete the program header table, changing its size if necessary.
If no program header table exists, the file is not a 32-bit class file, an error occurs, or elf is null, both functions return a null
pointer. Additionally, returns a null pointer if count is zero.
The table is an array of structures, each of which includes the following members.
The ELF header's member tells how many entries the program header table has (see elf_getehdr(3E)). A program may inspect this value to
determine the size of an existing table; automatically sets the member's value to count. If the program is building a new file, it is
responsible for creating the file's ELF header before creating the program header table.
For a 64-bit class file, returns a pointer to the program execution header table, if one is available for the ELF descriptor elf.
allocates a new table with count entries, regardless of whether one existed previously, and sets the bit for the table (see Specifying a
zero count deletes an existing table. Note this behavior differs from that of (see elf_getehdr(3E)), allowing a program to replace or
delete the program header table, changing its size if necessary.
If no program header table exists, the file is not a 64-bit class file, an error occurs, or elf is null, both functions return a null
pointer. Additionally, returns a null pointer if count is zero.
The table is an array of structures, each of which includes the following members.
The ELF header's e_phnum member tells how many entries the program header table has (see elf_getehdr(3E)). A program may inspect this
value to determine the size of an existing table; automatically sets the member's value to count. If the program is building a new file,
it is responsible for creating the file's ELF header before creating the program header table.
SEE ALSO elf(3E), elf_begin(3E), elf_flag(3E), elf_getehdr(3E).
elf_getphdr(3E)