07-19-2010
The code as written by the OP creates a "normal" environment variable, so simply writing $temp allows the for loop to work with each word.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to reference a two dimensional array in a
subroutine and can't seem to figure this one out in Perl.
Does anybody know? Please enlighten me.
#!/usr/bin/perl -w
use constant DIM => 4;
sub Shift_elements_right{
my (@Input, @Output) = @_;
for ($i = 0 ; $i <= DIM ;... (5 Replies)
Discussion started by: photon
5 Replies
2. Shell Programming and Scripting
I've created a series of arrays named as follows:
row1
row2
row3
.
.
.
row10
Each has 4 elements.
I'm trying to echo the array elements out in a for loop. Here's what I have:
for ((i=1;i<=10;i++))
do
for ((j=1;j<=4;j++))
do
eval out=${row`echo $i`}
echo -n $out (3 Replies)
Discussion started by: swankgd
3 Replies
3. Shell Programming and Scripting
I've made a habit of including a four-letter "tail" on image file names I download from the Web, so I can both match them with IPTC Transmission References of my own making and rename them later using either a GUI renamer or a script I've written myself. Now I want to automate the process of... (2 Replies)
Discussion started by: SilversleevesX
2 Replies
4. Shell Programming and Scripting
I got two files right now, input file (target file), reference file 1 (query file)
reference file 1 (long list of data)
KOLOPWMOPOPO
ADASDASD
ADSASDASDAD
.
.
target file (one long liner content)
ADASDASDTYUKOKOLOPWMOPOPOOPLUAADSASDASDADPOPOUYADADASDASD
desired output file content
... (1 Reply)
Discussion started by: patrick87
1 Replies
5. Shell Programming and Scripting
I got long list of reference file
>data_tmp_number_22
>data_tmp_number_12
>data_tmp_number_20
.
.
Input file:
>sample_data_1 Math, 5, USA, tmp
SDFEWRWERWERWRWER
FSFDSFSDFSDGSDGSD
>sample_data_2 Math, 15, UK, tmp
FDSFSDFF
>sample_data_3 Math, 50, USA, tmp
ARQERREQR
.
.
Desired... (7 Replies)
Discussion started by: perl_beginner
7 Replies
6. Programming
Hello All,
I am having this issue...where I am actually having hard time understanding the problem:
The code is as follows:
#include<iostream.h>
void fxn(char*** var)
{
int i =4;
*var = (char**)malloc(i*sizeof(char*));
for(int j =0; j<4; j++)
{
*var = "name";
cout<<*var;... (6 Replies)
Discussion started by: mind@work
6 Replies
7. Shell Programming and Scripting
Here is the question...
Create a new script, sub2, taking three parameters...
1.) the string to be replaced
2.) the string with which to replace it
3.) the name of the file in which to make the substitution
...that treats the string to be replaced as plain text instead of as a regular... (1 Reply)
Discussion started by: johnhisenburg
1 Replies
8. Shell Programming and Scripting
Guys,
May i know how can we de reference the code reference variable.?
my $a = sub{$a=shift;$b=shift;print "SUM:",($a+$b),"\n";};
print $a->(4,5);
How can we print the whole function ?
Please suggest me regarding this.
Thanks for your time :)
Cheers,
Ranga :) (0 Replies)
Discussion started by: rangarasan
0 Replies
9. Shell Programming and Scripting
Hello, all
For a 1-dimensional array, such as
myarr_1=1
myarr_1=2
myarr_1=3I know I can write a loop as below to show the array member one by one:
for (i in myarr_1){print i, myarr_1}Now, suppose I have a two dimensional array such as:
myarray_2=1 myarray_2=2
myarray_2=10 myarray_2=20My... (3 Replies)
Discussion started by: littlewenwen
3 Replies
CISS(4) BSD Kernel Interfaces Manual CISS(4)
NAME
ciss -- HP/Compaq Smart ARRAY 5/6 RAID controllers
SYNOPSIS
ciss* at pci? function ?
DESCRIPTION
The ciss driver provides support for the CISS interface implemented by fifth and later generations of the HP/Compaq Smart ARRAY family of
controllers.
The CISS interface is defined in the document entitled CISS Command Interface for SCSI-3 Support Open Specification, Version 1.04, Valence
Number 1, Compaq Computer Corporation, 2000/11/27.
This driver supports several Compaq and HP controllers implementing the CISS interface, including:
o Compaq Smart Array 5300 version 1
o Compaq Smart Array 5300 version 2
o Compaq Smart Array 5i version 1
o Compaq Smart Array 5i version 2
o HP Smart Array 5312
o HP Smart Array 6i
o HP Smart Array 641
o HP Smart Array 642
o HP Smart Array 6400
o HP Smart Array 6400 EM
o HP Smart Array E200
o HP Smart Array E200i
o HP Smart Array P400
o HP Smart Array P400i
o HP Smart Array P600
o HP Smart Array P800
o HP Smart Array V100
o HP Smart Array 1 through 13
These controllers support RAID 0, RAID 1, RAID 5, JBOD, and superpositions of those configurations.
Although the controllers are actual RAID controllers, the ciss driver makes them look just like SCSI controllers. All RAID configuration
must be done through the controllers' BIOSes.
Hardware from previous generations of this product family may be supported by the cac(4) driver.
SEE ALSO
bio(4), cac(4), intro(4), pci(4), scsi(4), sd(4)
HISTORY
The ciss driver first appeared in NetBSD 3.1.
AUTHORS
The ciss driver was written by Michael Shalayeff <mickey@openbsd.org>, and ported to NetBSD by Tonnerre Lombard <tonnerre@netbsd.org>.
BSD
May 28, 2008 BSD