I try to get a number of elements in an array, using dynamic array name.
I need the array name to be dynamic.
The array name is constructed as 'inf_ln_$nmb', where $nmb is a file line number
So, say I have the arr 'inf_ln_4':
> for (( el=0; el<${#inf_ln_4}; el++ )); do
> echo "$el:... (1 Reply)
morning guys and gals,
I am haveing a problem, a friend helped me out with this script but i dont know how to add incrementing number for each movie in movie.list. this is what i have so far. any assistance would be great.
I have removed the GT and LT symbols so you can see what is going on... (5 Replies)
Hi
I work in ksh88 and have a file which has several "set -A " statements:
set -A PNUM_LSTM 2713 4124 2635 270 2529 2259 2214
set -A PNUM_LSTM $*
for pn in ${PNUM_LSTM}
etc...
I need to add another number, lets say 555, to the first line ONLY so only the
the first line will be updated... (2 Replies)
Hello,
I am working on solving an NP-Complete problem, so it is very important that operations and data with limited integer-argument ranges be computed using immutable look-up-tables contained entirely in CPU cache. Retrieval of the look-up-table data must never leave the CPU once initially... (6 Replies)
Hi
I'm trying to create an array with variable including hyphen
but ksh refuses the first element
set -A allArgs
set +A allArgs ${allArgs} -all
set +A allArgs ${allArgs} -date
set +A allArgs ${allArgs} test
./test.ksh: -all: bad option(s)
It happens only when first element is like... (4 Replies)
I need to calculate the biggest number in array size n.
Example: Users enter: 1 7 4 9
The biggest number is : 9
Simple but I'm really new on this on Shell/Bash! Anything will be helpful! Thanks!
#!/bin/bash
printf "\tEnter a list of numbers, with spaces: "
read -a ARRAY
BIG=$1... (5 Replies)
Hello Unix Gurus,
I am new to Unix so need some help on this.
I am using the following commands:
1) mv -f Inputpath/*. outputpath
2) cp Inputpath/*. outputpath
3) rm -rf somepath/*
4) Find Inputpath/*.
Now I get the following error with... (18 Replies)
I have the following proc.
proc get_add {arg1 arg2 arg3 arg4 arg 5 .. ... arg N }
{
}
i need to count the number of arguments and also i need those arguments stored in an array.
please help out
---------- Post updated at 06:33 PM ---------- Previous update was at 05:30 PM ----------
... (1 Reply)
I have the following code to count the number of how many times the name occurred in one file. The code is working fine and the output is exactly what I want. The problem is the real code has more than 50 names in function listname which cause function name to have more than 50 case ,and function... (14 Replies)
Hello ,
I have a file : RestartSession.txt with the below contents :
Backup p203pcrw01_OS_Weekly Failed full 10/11/2015 10:00:07 PM 1444572007 10/11/2015 10:26:23 PM 1444573583 0:00 0:26 18.76 1 08 0 0 0 2 2 180668 ... (4 Replies)
Discussion started by: rahul2662
4 Replies
LEARN ABOUT SUSE
bzfgrep
BZGREP(1) General Commands Manual BZGREP(1)NAME
bzgrep, bzfgrep, bzegrep - search possibly bzip2 compressed files for a regular expression
SYNOPSIS
bzgrep [ grep_options ] [ -e ] pattern filename...
bzegrep [ egrep_options ] [ -e ] pattern filename...
bzfgrep [ fgrep_options ] [ -e ] pattern filename...
DESCRIPTION
Bzgrep is used to invoke the grep on bzip2-compressed files. All options specified are passed directly to grep. If no file is specified,
then the standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to
grep.
If bzgrep is invoked as bzegrep or bzfgrep then egrep or fgrep is used instead of grep. If the GREP environment variable is set, bzgrep
uses it as the grep program to be invoked. For example:
for sh: GREP=fgrep bzgrep string files
for csh: (setenv GREP fgrep; bzgrep string files)
AUTHOR
Charles Levert (charles@comm.polymtl.ca). Adapted to bzip2 by Philippe Troin <phil@fifi.org> for Debian GNU/Linux.
SEE ALSO grep(1), egrep(1), fgrep(1), bzdiff(1), bzmore(1), bzless(1), bzip2(1)BZGREP(1)