Sponsored Content
Full Discussion: printing arrays
Top Forums UNIX for Dummies Questions & Answers printing arrays Post 3735 by loitschix on Tuesday 10th of July 2001 11:53:53 AM
Old 07-10-2001
variable...

hi.

variable within a variable? i am not shure what you mean (my english si not so good, i am from vienna/austria, living in germany now), but look at this:

VAR1="alex"

VAR2=$($alex)

echo $VAR2


this is for kornshell!

cheers,
alex...
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Printing Problems in unix ... ( Bar-cdoe - Ip Printing)

Hi guys ... i need ur help with some printing problem in unix ... first prob. : i wanna print from my NCR unix to an Win NT , Ip based printing server ( HP JetDirect ) . My issue , is it possible to print directly to an Ip address from unix ? How do i make it work to get any results ?... (3 Replies)
Discussion started by: QuickSilver
3 Replies

2. Shell Programming and Scripting

Arrays

Dear all, How can i unset arrays. I mean all the subscripts including the array after using them. Could you direct me to some links of array memory handling in the korn shell. Thanks (2 Replies)
Discussion started by: earlysame55
2 Replies

3. Shell Programming and Scripting

arrays not printing properly in bash

hi guys, i wrote this script and it takes some fields from a file and puts it into three different arrays. The first array works just fine but when I try to use the second array (ARRAY1) all i get is a blank value on the screen.. this works fine..i get ARRAY value on the screen just fine ... (1 Reply)
Discussion started by: npatwardhan
1 Replies

4. Web Development

PHP arrays in arrays

PHP question... I have an SQL query that's pulled back user IDs as a set of columns. Rather than IDs, I want to use their names. So I have an array of columns $col with values 1,7,3,12 etc and I've got an array $person with values "Fred", "Bert", "Tom" etc So what I want to do is display the... (3 Replies)
Discussion started by: JerryHone
3 Replies

5. Programming

question about int arrays and file pointer arrays

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

6. Windows & DOS: Issues & Discussions

Linux to Windows Printing: PDF starts printing from middle of page.

We are using Red Hat. We have a issue like this: We want to print from Linux, to a printer attached to a Windows machine. What we want to print is a PDF. It prints, but the printing starts from the middle of the page. In the report, there is no space at the top but still printing starts from the... (5 Replies)
Discussion started by: rohan69
5 Replies

7. UNIX for Dummies Questions & Answers

Sco Unix printing : jobs hangs in queue - printing via lp versus hpnpf

Hi, We have a Unix 3.2v5.0.5. I installed a printer via scoadmin, HP network printer manager with network peripheral name (hostname and ipadres are in /etc/hosts). This is the configuration file : Code: root@sco1 # cat configurationBanner: on:AlwaysContent types: simpleDevice:... (0 Replies)
Discussion started by: haezeban
0 Replies

8. Programming

Arrays in C++

I've noticed something interesting in C++ programming. I've always done tricky stuff with pointers and references to have functions deal with arrays. Doing exercises again out of a C++ book has shown me an easier way, I didn't even know was there. It's weird to me. When dealing with arrays, it... (4 Replies)
Discussion started by: John Tate
4 Replies

9. UNIX for Dummies Questions & Answers

Arrays

Am using bash For eg: Suppose i have a array arr=(1 2 3 4 5 6 7 8 9 10 11 12) suppose i give input 5 to a script and script should able to print values greater than or equal to 5 like below: Input: 5 output: 5,6,7,8,9,10,11,12 (7 Replies)
Discussion started by: manid
7 Replies

10. UNIX for Beginners Questions & Answers

Printing, SYSPRINTER, IP printing

Dear readers, We have a printer problem with a UNIX system. The OS is Unix IRIX 6.5 We have connected a printerto the system. If we then make a test print everything goes well . (IP printing) But if we make a print from the "orrga,i"program. Then we see all the printouts stuck within the... (3 Replies)
Discussion started by: SergevdH
3 Replies
alex(1mh)																 alex(1mh)

Name
       alex - extract addresses from message headers

Syntax
       alex [ +folder ] [ msgs ] [ options ]

Description
       The  address  line  extraction  utility	extracts electronic mail addresses from message headers and prints the addresses on your screen or
       places them, with a specified alias name, in an alias file.

       By default, searches for addresses in the current message in the current folder.  You can list the messages you wish  to  search  giving  a
       msgs argument.  You can also search messages in a different folder by giving a +folder argument.

       You  define  the  fields from which you want addresses by using combinations of field names with the -field option.  You can also supply an
       address yourself as a value to the -address option.  Results are printed either to your screen or to a file in format.  Where there  is	an
       address	group  in  the	alias  file  with  an alias name identical to one you have specified in an command, it may be replaced	or the new
       addresses appended.  A copy of the original alias file is kept.

       By default, searches the Reply-to:, Sender:, From: and To: header fields in that order until an address is found. You can set up  your  own
       default values for in your file; see

       When giving options to the command, generally the shortest unique abbreviation suffices.

Options
       -address string
		 Accepts  an  address  that  you  type in, rather than taking an address from a message.  If any -field option is specified, it is
		 ignored.

       -alias filename
		 Specifies the name of the alias file, in which aliases are placed.  You must provide a file name or a dash  (-)  as  an  argument
		 with  this  option.   There  is  no default value.  If the value given for this option is -, or the option is not specified, will
		 print the output to your screen.  If you do not give the full pathname of your alias file, will look for the alias file  in  your
		 Mail  directory, as specified in the Path field of your file.	If cannot locate the alias file in the directory that you specify,
		 it will ask you whether or not you wish to create one.

		 You can set up an alias file to be used by in your see for more information.  Like other mail commands, uses the Aliasfile  entry
		 to find the alias file.

       -compress
       -nocompress
		 Prevents  any repetition of the same address in the output of an command.  You can use this option when there are multiple occur-
		 rences of an address in an address group and you want just one occurrence of it in your alias.  The default is -nocompress.

       -field name[ /name ... ]
       -nofield  Specifies the name of a header field.	The name of the field is not case-sensitive.  If you specify this option without providing
		 an  argument,	the  default  values  are:  -field reply-to/sender/from/to.  You can set up your own default values for the -field
		 option in your See

		 Examples of field names are From, cc and To.  You must not type a colon after the name of a field.  When more field names follow,
		 in the form /name, the message header is searched for each of the fields in turn until one is found.  Only the first header field
		 found to contain an address is used; the rest are ignored.

		 The option -nofield excludes the named field.

		 The special name, all, means all fields, and can be used as a value for the -nofield option to  override  any	default  order	of
		 header fields, otherwise -field values are appended to any default values.

       -global	 Specifies  that  any  address replacements or appendings will apply to all occurrences of that alias name.  Normally, if an alias
		 name is entered in the alias file more than once, any actions performed by are performed only on the  first  occurrence  of  that
		 alias name.  The -global option ensures that any changes are made to all occurrences of the alias.  Whenever this option is spec-
		 ified, a message is broadcast to your screen telling you how many entries in the alias file have been changed.

       -help	 Prints a list of the valid options for this command.

       -name name
		 Specifies the alias name for address information extracted.  The command appends a colon (:) to the name as required by If you do
		 not  specify  this  option, will print extracted addresses to your screen.  If you specify this option, you must provide an argu-
		 ment; there is no default value.

       -query
       -noquery  Extracts addresses interactively.  Before adding each address of a list of extracted addresses to an alias group, the mail system
		 will ask you whether you wish the address to be added.  The query prompt is written on the standard error output.  The default is
		 -noquery.

       -replace
       -noreplace
		 Replaces existing alias with the new list of addresses.  By default, if there is an existing alias with the same name as the  one
		 you  are  trying  to  create, appends the new address list to the old alias.  If an address appears in both address groups, it is
		 still appended, so that it appears twice in the new alias.  You can specify this explicitly by using the -noreplace  option.	If
		 you specify the -replace option, the new list of addresses replaces the existing group.  The default is -noreplace.

       -width n  Specifies  the  maximum width of your alias file line.  If an alias group extends beyond this length, it is continued on the next
		 line, with a backslash () at end of the first line.  This option affects the format of each individual entry when it	is  imple-
		 mented; any subsequent or previous entries in the alias file remain the same.	The default is 72 characters.

Restrictions
       Because the -nofield option can take the value all as an argument, will not recognize a header field called All.  If you wish to use such a
       header field, you should call it X-all.

       If a command line contains contradictory arguments then the last value specified is used.  For example, in the following command, only uses
       the options -name fred and -noreplace:
       % alex -name sam -name fred -replace -noreplace

Examples
       This example takes the address from the From field of the current message, and places it in your alias file with the alias name bob:
       % alex -field from -alias aliases -name bob

       The  following  example	shows what happens if you specify an alias file that does not exist.  You are asked whether you want to create the
       file; enter y to create it:
       % alex -field from -name bob -alias aliases
       Create alias file "HOME/Mail/aliases"? y

       The next example takes addresses from two fields, From and cc, and saves them as the alias sales_team:
       % alex -field from -field cc -alias aliases -name sales_team

Files
       Your user profile.

See Also
       ali(1mh), mh(1mh), pick(1mh), mh-alias(5mh), mh_profile(5mh)

																	 alex(1mh)
All times are GMT -4. The time now is 08:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy