10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to create a script that combines 2 arrays:
#!/bin/bash
read -a unix #(a c e g)
read -a test #(b d f)
#now I want to merge ${unix} with ${test}, one after another such that the result would be: (abcdefg)
#I've tried quite a few options and can't seem to make it work (5 Replies)
Discussion started by: pbmitch
5 Replies
2. Shell Programming and Scripting
Hi all
Need little help from you
my aim is like merging the output of 6 files (log_files)
And merge it into the one master file
tell me the script for this
please
thanks in advance
Please reply in mail if possible
<email removed>
Regards:
zimmy (1 Reply)
Discussion started by: zimmyyash
1 Replies
3. Programming
if i declare both but don't input any variables what values will the int array and file pointer array have on default, and if i want to reset any of the elements of both arrays to default, should i just set it to 0 or NULL or what? (1 Reply)
Discussion started by: omega666
1 Replies
4. Shell Programming and Scripting
I have 2 arrays,
@array1 contains records in the format
1|_|X|_|ssd|_|
4|_|H|_|hbd|_|
9|_|Y|_|u8gjdfg|_|
@array2 contains records in the format
X|_|asdf|_|
Y|_|qwer|_|
A|_|9kdkf|_|
@array3 should contain records in the PLz
X|_|ssd|_|asdf|_|
Y|_|hdb|_|qwer|_|
PLZ dont use... (2 Replies)
Discussion started by: centurion_13
2 Replies
5. Shell Programming and Scripting
I am facing a strange situation where I need to collect logs and consolidate them.
All logs are under say /tmp/useless and all logs are under subdir of the form IPaddresses_x_y
eg: /tmp/useless/105.52.34.246_3_1
/tmp/useless/105.52.1.118_0_10
There are several logs under each... (2 Replies)
Discussion started by: zpn
2 Replies
6. Shell Programming and Scripting
I have 2 arrays abc and xyz
abc = ( a b c d e f g h i j k l m n o p q r s t u v w x y z )
and
xyz = ( b c d e f )
lets assume a .... z are the file name.
I have to perform a pattern replacement on each file present in abc array accept the files i have in xyz array. and i am doing... (4 Replies)
Discussion started by: kukretiabhi13
4 Replies
7. UNIX for Dummies Questions & Answers
Hi, I want to write a script that is designed to find the largest entry in a nonempty list of integers.
i was thinking about using array variables, but i'm not sure
any ideas? (3 Replies)
Discussion started by: FOBoy
3 Replies
8. Shell Programming and Scripting
Hi all,
I need some help in merging arrays. I have two arrays and using korn shell
Array1
AB23
AB24
Array2
CD00
CD01
CD02
Elements from array 1 should always alternate with elements of arrays 2
i.e the result should look like
AB23CD00
AB24CD01
AB23CD02
Any help is appreciated.... (4 Replies)
Discussion started by: jakSun8
4 Replies
9. Shell Programming and Scripting
Hi,
can we use arrays in shell script?
I have this so far:
#!/bin/sh
isql -Usa -P -S DBSERVER -o output << EOF
sp_transactions "state", "prepared", "xactname"
go
/
EOF
the file 'output'' will be have many entries and I want to caputre the transaction names only: grep 000 output works... (3 Replies)
Discussion started by: melanie_pfefer
3 Replies
10. Shell Programming and Scripting
hello all.. I have been browsing / searching through the forum and have yet not been able to find what I was looking for.
I am fairly new to ksh and my task is to create a function that reads in an input file:
*****************
2
3
1
abc
def
ghi
/dev/sid/
*****************... (13 Replies)
Discussion started by: sidamin810
13 Replies