Thanks for the quick replies. I was able to get the read to work.
But for some reason I was not getting inside the if condition loop. I kept getting this error:
Turns out the if statement cannot handle -o or ||. Strange, but that's a problem for some other day.
My code looks like this now, I thought about awk '/myAgent/{print8}', but I then get an extra line with just awk. So I'll have to do a grep -v awk.
I am just stucked in syntax.This is more like a array and for loop problem.
I want to use ls -l command and get filezise and filename of all filenames in the directory in an array (say array#1).
After 2 minutes of sleep, i want to get the same information in another array (say array#2).
The... (4 Replies)
- I m retreving values from database and wish to use those values later in my shell script. I m placing these values in an array da_data but outside loop array is empty.Problem is its treating array as local inside loop hence array is empty outside loop.
Plz go through the script and suggest how... (1 Reply)
Hello!
I have a question about loops and arrays. I'm trying to go through this:
for aa in 01 02 03
OrigNum=$(grep ${Orig} Ba3In2F12.prepos | wc -l)
OrigNum=$((${OrigNum} - 1))
echo ${OrigNum}
etc
It gets stuck on the second line. The error reads:
./asdf: line 30:... (5 Replies)
Hi
I have something like
cat $HOME/all_dirs | while read ln_old_dirs
do
if
then
echo "$ln_all_old_dirs"
fi
done
As you know that the variable ln_all_old_dirs is not accessable from outside the... (2 Replies)
Hi everyone:)
I have 2 files - IN & OUT. Example:
IN
A:13:30
B:45:40
.
.
. UNLIMITED
OUT
Z:12:24
Y:20:15
.
.
. UNLIMITED
I want first row of numbers of IN - OUT. Example 13-12 45-20
My code is (2 Replies)
I've got this problem, if I modify an array in the loop and print it, everything is fine as long as I stay in the loop. But, when I print it outside the loop, nothing happens... How can I solve this problem?
Here I prepared a sample for you to see my problem;
zgrw@Rain:~$ cat test
asd
123... (4 Replies)
Hello All,
Maybe I'm Missing something here but I have NOOO idea what the heck is going on with this....?
I have a Variable that contains a PATTERN of what I'm considering "Illegal Characters". So what I'm doing is looping
through a string containing some of these "Illegal Characters". Now... (5 Replies)
Hi, I have the following problem that is beyond what I can currently do with bash scripting.
In file 1, I have ~ 2500000 values. Note this file is not sorted.
3 19 LABEL_A
3 37 LABEL_B
2 12 LABEL_C
1 15 LABEL_D
I have a list of values in "file 2" ~ 25000 unique lines:
Note -... (6 Replies)
Hi there,
A bit new to bash and am having an issue with a for loop. I look for filenames in a specified directory and pull the date string from each meeting a certain criteria, and then would like to make a directory for each date found, like this:
search 20180101.gz 20180102.gz 20180103.gz... (5 Replies)
Discussion started by: mwheeler12
5 Replies
LEARN ABOUT ULTRIX
ldlinit
ldlread(3x)ldlread(3x)Name
ldlread, ldlinit, ldlitem - manipulate line number entries of a common object file function
Syntax
#include <stdio.h>
#include <filehdr.h>
#include <syms.h>
#include <ldfcn.h>
int ldlread (ldptr, fcnindx, linenum, linent)
LDFILE *ldptr;
long fcnindx;
unsigned short linenum;
LINER linent;
int ldlinit (ldptr, fcnindx)
LDFILE *ldptr;
long fcnindx;
int ldlitem (ldptr, linenum, linent)
LDFILE *ldptr;
unsigned short linenum;
LINER linent;
Description
The function searches the line number entries of the common object file currently associated with ldptr. The function begins its search
with the line number entry for the beginning of a function and confines its search to the line numbers associated with a single function.
The function is identified by fcnindx, which is the index of its local symbols entry in the object file symbol table. The function reads
the entry with the smallest line number equal to or greater than linenum into linent.
The and functions provide the same behavior as After an initial call to or can be used to retrieve a series of line number entries associ-
ated with a single function. The function simply finds the line number entries for the function identified by fcnindx. The function finds
and reads the entry with the smallest line number equal to or greater than linenum into linent.
The functions and each return either success or failure. The function fails if one of the following occurs:
o If line number entries do not exist in the object file.
o If fcnindx does not index a function entry in the symbol table.
o If it does not find a line number equal to or greater than linenum.
The fails if it does not find a line number equal to or greater than linenum.
See Alsoldclose(3x), ldopen(3x), ldtbindex(3x), ldfcn(5)
RISC ldlread(3x)