Sponsored Content
Full Discussion: multiple array
Top Forums UNIX for Dummies Questions & Answers multiple array Post 302160681 by vakharia Mahesh on Tuesday 22nd of January 2008 11:08:28 AM
Old 01-22-2008
Network multiple array

we are using Linux Red hat version 9 and using bash shell .

Can any one help me in passing Name field interactivly and search the names from the data??Say I have
ARTHUR, SMITH, DANIS, CHARLES,GEORGE and likewise names in the
address's data and I want to search the same from the awk script .
i.e. I may want to pass two names or sometime five names :

echo -n 'Enter the Names you want to search:' >/dev/tty
read nam
awk '{ }' addr-dat > nnames

We can pass the name within the scripts but I want it to be flexible , I dont want hard-coding the name within the script but want to pass it from
the outside and it may be three or five names .

Thanks in advance .Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

multiple 'if' statements out of array

I want to do multiple comparisons on a series of numbers from an array: I send the numbers in file1 through want to print out some info from file2 based on some conditions. The syntax just isn't correct??? awk ' NR==FNR{ a=$0 next ... (2 Replies)
Discussion started by: dcfargo
2 Replies

2. UNIX for Dummies Questions & Answers

Help in Array looping and creating multiple lines

hi Gurus, I'm a newbie in scripting please check my script if this is correct. I think there's something wrong with it but I;m not sure. I'm trying to create multiple lines using awk from external xml files but i want to add additonal info in the data manually Since i don't knwo how to... (0 Replies)
Discussion started by: sexyTrojan
0 Replies

3. UNIX for Dummies Questions & Answers

Define multiple expression to single array?

This is fine and workinga = "A/A" How to define some thing like this ??? a = "A/A" or "T/T or some thing else (2 Replies)
Discussion started by: stateperl
2 Replies

4. Shell Programming and Scripting

Awk multiple variable array: comparison

Foo.txt 20 40 57 50 22 51 66 26 17 15 63 18 80 46 78 99 87 2 14 14 51 47 49 100 58 Bar.txt 20 22 51 15 63 78 99 55 51 58 How to get output using awk 20 22 57 50 51 15 26 17 63 78 80 46 99 55 - - 51 58 49 100 (5 Replies)
Discussion started by: genehunter
5 Replies

5. Shell Programming and Scripting

Multiple array problem in NAWK

I HAD these 2 files: file1 pictures.txt 5 ref2313 4 ref2345 3 ref5432 2 ref4244 1 dance.txt 6 ref2342 5 ref2352 4 ref0695 3 ref5738 2 ref4948 1 treehouse.txt 6 ref8573 5 ref3284 4 ref5838 3 ref4738 2 ref4573 1 file2 pictures.txt 1 3 dance.txt 2 4 treehouse.txt 3 5 what I... (1 Reply)
Discussion started by: linuxkid
1 Replies

6. Shell Programming and Scripting

Multiple Variables in Array from Existing Directories

I would like to extract directories from a specific place and keep them into an array of variables to run functions into it. Example, bash-3.00$ls adrian bryan caren derrick I want to keep each directory names into a variable adrian --> document bryan --> document caren --> document... (3 Replies)
Discussion started by: lynxlee
3 Replies

7. Shell Programming and Scripting

need [HELP] sum array multiple files

Hi.. I'm very newbie here.. I wonder if somebody can help me.. I have multiple directories with same out file name for each directories.. ./dirA/out.dat ./dirB/out.dat ./dirC/out.dat ..and so on.. for ./dirA/out.dat here is the structure content : for ./dirB/out.dat the same... (6 Replies)
Discussion started by: agiantz
6 Replies

8. UNIX for Dummies Questions & Answers

need [HELP] sum array multiple files

Hi.. I'm very newbie here.. I wonder if somebody can help me.. I have multiple directories with same out file name for each directories.. ./dirA/out.dat ./dirB/out.dat ./dirC/out.dat ..and so on.. for ./dirA/out.dat here is the structure content : for ./dirB/out.dat the same... (4 Replies)
Discussion started by: agiantz
4 Replies

9. Shell Programming and Scripting

Array in awk outputs multiple values

Disclaimer: OP is 100% Awk beginner. I use this code on ASCII files I need to report against. awk 'BEGIN { tokens = 0 tokens = 0 tokens = 0 } { for (token in tokens) { if ($1 == token){print $0; tokens++;}}} END {for (token in tokens){ if( tokens ==... (1 Reply)
Discussion started by: alan
1 Replies

10. Programming

ksh array updated by multiple scripts

Hello! Is it possible to update an array created in a ksh script by a child script that was spawned by the parent? So, if I have... #!/bin/ksh set -A myArray "Zero" "One" "Two" echo "0: ${myArray}" echo "1: ${myArray}" echo "2: ${myArray}" ./second_script.ksh ${myArray } echo... (2 Replies)
Discussion started by: garskoci
2 Replies
whois(1)							   User Commands							  whois(1)

NAME
whois - Internet user name directory service SYNOPSIS
whois [-h host] identifier DESCRIPTION
whois searches for an Internet directory entry for an identifier which is either a name (such as ``Smith'') or a handle (such as ``SRI- NIC''). To force a name-only search, precede the name with a period; to force a handle-only search, precede the handle with an exclamation point. To search for a group or organization entry, precede the argument with * (an asterisk). The entire membership list of the group will be displayed with the record. You may of course use an exclamation point and asterisk, or a period and asterisk together. EXAMPLES
Example 1 Using The whois Command The command: example% whois Smith looks for the name or handle SMITH. The command: example% whois !SRI-NIC looks for the handle SRI-NIC only. The command: example% whois .Smith, John looks for the name JOHN SMITH only. Adding ... to the name or handle argument will match anything from that point; that is, ZU ... will match ZUL, ZUM, and so on. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWrcmdc | +-----------------------------+-----------------------------+ SEE ALSO
attributes(5) SunOS 5.11 6 Nov 2000 whois(1)
All times are GMT -4. The time now is 11:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy