10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I am creating filesystem for block device, but I want to pass array value one by one acording to block device count.
$tmp1 = block device count 3
$blockdevice =
So I want to first pass sdb1 alone in loop, how to take only block device seprately from $blockdevice array. (1 Reply)
Discussion started by: stew
1 Replies
2. Shell Programming and Scripting
Hi All
I have multiple arrays like below.
set -A val1 1 2 4 5
set -A val2 a b c d
.
.
.
Now i would like to pass the individual arrays one by one to a function and display/ do some action.
Note : I am using ksh
Can you please advise any solution...
Thanks in advance. (7 Replies)
Discussion started by: Girish19
7 Replies
3. UNIX for Dummies Questions & Answers
How do i pass an array from test4.sh to a function in another shell script test5.sh, basically i am sourcing the test5.sh in test4.sh and printing the contents, but not working below are my trial scripts, please help, thank you.
#!/bin/bash
# /usr/local/dw/archive/test5.sh
print_array()
{... (5 Replies)
Discussion started by: Ariean
5 Replies
4. Shell Programming and Scripting
Hi, all
suppose I have following myfile (delimited by tab)
aa bb
cc dd
ee ffand I have following awk command:
awk 'BEGIN{FS="\t"}{AwkArrayVar_1=$1;AwkArrayVar_2=$2};END{for(i=0; i<NR; i++) print i, AwkArrayVar_1, AwkArrayVar_2,}' myfileMy question is: how can I assign the awk array... (7 Replies)
Discussion started by: littlewenwen
7 Replies
5. Red Hat
Hi all,
Hereby wish to have your advise for below:
Main concept is
I intend to get current directory of my script file.
This script file will be copied to /etc/init.d.
A string in this copy will be replaced with current directory value.
Below is original script file:
... (6 Replies)
Discussion started by: cielle
6 Replies
6. Shell Programming and Scripting
Hi,
Please guide to pass an array as a arg to a script...
for example,
I have a script small.sh to find the small no of given arg as below...
#! /bin/sh
# this script is for finding the small number
set -A arr_no_updates
small=$1
i=1
for arr in $@
do
if (3 Replies)
Discussion started by: little_wonder
3 Replies
7. UNIX for Dummies Questions & Answers
Hi experts,
I am here again with another Issue.
I need to pass the array as parameter / argument to another script.
I tried it as follows . ( I got this idea from the link )
$ cat test1.sh
#! /usr/bin/ksh
set -a arr1
echo "...In Test1...."
arr1="APPS_DEV"
arr1="TEST_DEV"
echo... (16 Replies)
Discussion started by: rajavu
16 Replies
8. Programming
Please excuse my ineptitude for a bit as I've been spoiled for the past few months with only writing perl code instead of C.
So ok, I've been thinking about some code to change the crc32 values that are held within central directory headers of zip files.
Because I'm lazy I decided to just... (3 Replies)
Discussion started by: VRoemer
3 Replies
9. Shell Programming and Scripting
Hi all..
Does anyone know have an example of passing the contents of a ksharray to oracle?
basically I am looking to loop through the contents of a file and store each line into a bash ksh. Once i have this I can then pass the array into an oracle procedure that accepts an array as an... (1 Reply)
Discussion started by: kiranlalka
1 Replies
10. Shell Programming and Scripting
I want to pass an array in my function, And my function will be changing the elements of the array in the fuction, but it should not affect the values in my array variable of main function (1 Reply)
Discussion started by: ranjithpr
1 Replies