10 More Discussions You Might Find Interesting
1. Programming
Corona688 was great in helping me learn how to create arrays that hold other two dimensional array here. Unfortunately I didn't think ask about how to implement or call them. Basically, I'm trying to call an array of two-dimensional arrays like this:
declaration:
int (*side_one) = { { white_l1,... (6 Replies)
Discussion started by: Azrael
6 Replies
2. Shell Programming and Scripting
hello,
i need a bit of help on how to do this effectively in bash without a lot of extra looping or massive switch/case
i have a long array of M elements and a short array of N elements, so M > N always. M is not a multiple of N.
for case 1, I want to stretch N to fit M
arrayHuge
H = (... (2 Replies)
Discussion started by: f77hack
2 Replies
3. Shell Programming and Scripting
Here's my code:
awk -F '' 'NR==FNR {
if (/time/ && $5>10)
A=$2" "$3":"$4":"($5-01)
else if (/time/ && $5<01)
A=$2" "$3":"$4-01":"(59-$5)
else if (/time/ && $5<=10)
A=$2" "$3":"$4":0"($5-01)
else if (/close/) {
B=0
n1=n2;
... (2 Replies)
Discussion started by: klane
2 Replies
4. Shell Programming and Scripting
Example data
The sub and array in question
sub parse_status {
my $status_info = shift;
my @info;
push @info,"$1\n" if $status_info =~ /(System State : +)/;
push @info, "System_Uptime : $1\n" if $status_info =~ /Uptime:.+?up (.+?), load/;
push @info, "$1\n" if $status_info =~... (2 Replies)
Discussion started by: popeye
2 Replies
5. Shell Programming and Scripting
here is what i have...
i=1
while read line
do
if grep -i-q "create procedure"<<<$line
then
startline="$line"
endline="blahblah"
Get procedure name into a variable named procName
procName="procedure name is stored"
do some... (2 Replies)
Discussion started by: vivek d r
2 Replies
6. Shell Programming and Scripting
Hello together,
first of all, iam really a beginner in Shellskripting and i need some help please. Following Task i try to finished:
vmtoolsd --cmd 'info-get guestinfo.ovfEnv' > vmt
In the file vmt are some strings that iam searching for.
For that i try to create a array like:
... (2 Replies)
Discussion started by: dreipapier
2 Replies
7. Programming
Hi All
I need to get <STDIN> from a user. the <STDIN> is a range of number delimited by "," (comma) and can be with range delimited by "-".
Example: 1,2,3,4-9,12,15,34-36,70
Now I need to get this from the user and go on each number and "Do something"... but when trying to do this as above... (2 Replies)
Discussion started by: RedGrinGo
2 Replies
8. Shell Programming and Scripting
Dear All,
i facing problem to use string having spaces in for loop..
file used for FOR LOOP
command.txt
rpm -t -v ttm -D -r RJLL -h YELP
rpm -t -v ttm -D -r RJLL -h ERRT
rpm -t -v ttm -D -r RJLL -h TYYE
rpm -t -v ttm -D -r RJLL -h POOL
CODE using for execute above command... (3 Replies)
Discussion started by: arvindng
3 Replies
9. Programming
Hi,
Well as the title says, I have an array of strings (delimited by null). The length of the array is variable and length of each string is variable as well. What I need is one huge string with the original strings in the array separated by spaces.
For example is an array is such that array... (12 Replies)
Discussion started by: newhere
12 Replies
10. Shell Programming and Scripting
Hi
Simple thing has been driving me nuts. I have used the following code is ksh scripts to get data from Oracle table and then display it, allowing user to select one of the data options returned...
REP_DATA=`sqlplus -s ${WMSDB} <<EOF
SET SERVEROUTPUT ON FEEDBACK OFF... (0 Replies)
Discussion started by: mikem22
0 Replies