Sponsored Content
Top Forums Shell Programming and Scripting Assigning multiple variables in ksh script Post 302918545 by seekryts15 on Wednesday 24th of September 2014 05:54:37 AM
Old 09-24-2014
Computer Assigning multiple variables in ksh script

Is it possible to have a user input multiple words in one line and have the script assign each word a variable? I'm stuck please assist.

Example using "BILL JOHN SARA JILL" as what the user could type:

Code:
printf "Enter account names: "      BILL JOHN SARA JILL  
read input

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

passing variables to awk from ksh script

I'm trying to write a ksh script that uses awk, but I want to pass variables to awk. For example (not working): if ];then searchstr=$1 lsof -i | awk '{if($9~/SEARCHSTR/) print $2} SEARCHSTR=$searchstr' else echo "usage: $0 <search string>" fi I tried several options. Is it... (3 Replies)
Discussion started by: rein
3 Replies

2. Shell Programming and Scripting

passing a variables value from the called script to calling script using ksh

How do i get the value of the variable from the called script(script2) to the calling script(script1) in ksh ? I've given portion of the script here to explain the problem. Portion of Script 1 ============= ----- ----- tmp=`a.ksh p1 p2 p3` if then # error processing fi -----... (10 Replies)
Discussion started by: rajarkumar
10 Replies

3. Shell Programming and Scripting

ksh help assigning specific values to variable in script

Hi - Help needed. I have an input file that looks something like this, but with a lot more entries: A Customer1 B 4500 C 8000 A Customer2 B 6422 C 8922 I need to be able to print details for each customer on one line per customer. ie. if I could print these to a file and then cat... (3 Replies)
Discussion started by: frustrated1
3 Replies

4. Shell Programming and Scripting

awk splits file in to multiple - how to get filenames in variables withing ksh?

Hi all, I'm using awk in a .ksh script to split one file by line prefix into different files (up to 4). The files are named after the prefix in the line, and a sequence no. Is there any way to get the filenames in to variables too? I need _ftpfile1, _ftpfile2, _ftpfile3 and _ftpfile4 which are... (2 Replies)
Discussion started by: spidermike
2 Replies

5. Shell Programming and Scripting

Assigning values to reference variables for a dynamic menu driven script.

How do I assign values to reference variables? I am assigning a variable name to --> $user_var Then I am trying to change its underlying variable value by $((user_var))=$user_value .. its failing,, Please let me know if there is a way to do this dynamically.. FileA.props... (5 Replies)
Discussion started by: kchinnam
5 Replies

6. Shell Programming and Scripting

awk issue expanding variables in ksh script

Hi Guys, I have an issue with awk and variables. I have trawled the internet and forums but can't seem to get the exactt syntax I need. I have tried using awk -v and all sorts of variations but I have hit a brick wall. I have spent a full day on this and am just going round in circles. ... (3 Replies)
Discussion started by: gazza-o
3 Replies

7. Shell Programming and Scripting

ksh passing to awk multiple dyanamic variables awk -v

Using ksh to call a function which has awk script embedded. It parses a long two element list file, filled with text numbers (I want column 2, beginning no sooner than line 45, that's the only known thing) . It's unknown where to start or end the data collection, dynamic variables will be used. ... (1 Reply)
Discussion started by: highnthemnts
1 Replies

8. Shell Programming and Scripting

How to store results of multiple sql queries in shell variables in ksh?

Hi, I have a script where I make a sqlplus connection. In the script I have multiple sql queries within that sqlplus connection. I want the result of the queries to be stored in shell variables declared earlier. I dont want to use procedures. Is there anyway else. Thanks in advance.. Cheers (6 Replies)
Discussion started by: gonchusirsa
6 Replies

9. Shell Programming and Scripting

Running a script with multiple variables like 25 variables.

Hi All, i have a requirement where i have to run a script with at least 25 arguements and position of arguements can also change. the unapropriate way is like below. can we achieve this in more good and precise way?? #!/bin/ksh ##script is sample.ksh age=$1 gender=$2 class=$3 . . .... (3 Replies)
Discussion started by: Lakshman_Gupta
3 Replies

10. Shell Programming and Scripting

Assigning multiple column's value from Oracle query to multiple variables in UNIX

Hi All, I need to read values of 10 columns from oracle query and assign the same to 10 unix variables. The query will return only one record(row). I tried to append all these columns using a delimiter(;) in the select query and assign the same to a single variable(V) in unix. I thought I... (3 Replies)
Discussion started by: hkrishnan91
3 Replies
TACTIS(5)							File Formats Manual							 TACTIS(5)

NAME
TACTIS, tactis - A character encoding system (codeset) for Thai. DESCRIPTION
The TACTIS (Thai API Consortium/Thai Industrial Standard) codeset consists of the following two character sets: ASCII (ISO 646-1983) TIS 620-2533 These characters are 8-bit coded, ranging from 00 to FF. ASCII Characters In the TACTIS codeset, all ASCII characters are implemented in the form of single-byte, 7-bit characters; that is, the most significant bit (MSB) of ASCII characters is always set off. For more information, refer to ascii(5). TIS 620-2533 Characters The TIS 620-2533 character set includes 89 characters that are categorized as follows: Consonants: 44 Vowels: 18 total (5 leading vowels, 6 following vowels, 2 below vowels, and 5 above vowels) Tone marks: 4 Diacritics: 5 (4 above diacritics and 1 below diacritic) NonComposi- bles: 8 (1 nobreak space, 10 Thai digits, 6 Thai special characters, and 1 word separator) Note Thai digits are not recognized by the isdigit(), iswdigit(), isxdigit(), and iswxdigit(), isalnum(), and iswalnum() functions. Many applications make assumptions about how a digit character can be converted to its numeric equivalent. Changing the functions to rec- ognize Thai digits would break these applications. Code Ranges in the TACTIS Codeset In the TACTIS codeset, the most significant bit (MSB) of a byte is set on in codes for TIS 620-2533 characters. This differentiates TIS 620-2533 character code from ASCII character code. Following are the code ranges for each of the five categories of Thai characters in the codeset: -------------------------------------------------- Category Code Range (hex) -------------------------------------------------- Consonants A1 to CE Leading vowels E0 to E4 Normal following vowels D0, D2, D3, E5 Special following vowels C4, C6 Below vowels D8, D9 Above vowels D1, D4 to D7 Tone marks E8 to EB Above diacritics E7, EC to EE Below diacritics DA Nobreak space A0 Thai digits F0 to F9 Thai special characters CF, DF, E6, EF, FA, FB Word separator DC -------------------------------------------------- In TACTIS, the hexadecimal code points of TIS 620-2533 characters are as follows: A0 NO-BREAK SPACE C0 PO SAMPOW E0 SARA E A1 KO KAI C1 MO MA E1 SARA AE A2 KHO KHAI C2 YO YAK E2 SARA O A3 KHO KHUAT C3 RO RUA E3 SARA AI MAIMUAN A4 KHO KHWAI C4 RU E4 SARA AI MAIMALAI A5 KHO KHON C5 LO LING E5 LAKKHANGYAO A6 KHO RAKHANG C6 LU E6 MAIYAMOK A7 NGO NGU C7 WO WAEN E7 MAITAIKHU A8 CHO CHAN C8 SO SALA E8 MAI EK A9 CHO CHING C9 SO RUSI E9 MAI THO AA CHO CHANG CA SO SUA EA MAI TRIE AB SO SO CB HO HEEP EB MAI CHATTAWA AC CHO CHOE CC LO CHULA EC THANTHAKHAT AD YO YING CD O ANG ED NIKHANHIT AE DO CHADA CE HO NOKHUK EE YAMAKKAN AF TO PATAK CF PAIYANNOI EF FONGMAN B0 THO THO THAN D0 SARA A F0 THAI ZERO B1 THO NANGMONTHO D1 MAI HAN-AKAT F1 THAI ONE B2 THO PHOO THAO D2 SARA AA F2 THAI TWO B3 NOR NANE D3 SARA AM F3 THAI THREE B4 DOR DEK D4 SARA E F4 THAI FOUR B5 TO TAO D5 SARA EE F5 THAI FIVE B6 THO THUNG D6 SARA UR F6 THAI SIX B7 THO THAHAN D7 SARA UUR F7 THAI SEVEN B8 THO THONG D8 SARA U F8 THAI EIGHT B9 NO NU D9 SARA UU F9 THAI NINE BA BO BAIMAI DA PHINTHU FA ANGKHANKHU BB PO PLA DB FB KHOMUT BC PHO PERNG DC WORD SEPARATOR FC BD FO FA DD FD BE PO PAN DE FE BF FO FAN DF BAHT FF For more information on Thai characters, refer to Wototo(5). Fonts for TIS 620 2533 The operating system provides both screen and printer fonts for TIS 620 2533 characters. The following bitmap fonts reflect various sizes and typefaces for 75dpi and 100dpi display devices: -adecw-screen-medium-r-normal--14-140-75-75-p-70-tis620.2533-1 -adecw-screen-medium-r-normal--18-180-75-75-p-80-tis620.2533-1 -adecw- screen-medium-r-normal--24-240-75-75-p-120-tis620.2533-1 -adecw-screen-medium-r-normal--14-140-100-100-p-70-tis620.2533-1 -adecw-screen- medium-r-normal--18-180-100-100-p-80-tis620.2533-1 -adecw-screen-medium-r-normal--24-240-100-100-p-120-tis620.2533-1 The operating system provides the following Thai fonts for PostScript printers: AngsanaUPC-Bold AngsanaUPC-BoldItalic AngsanaUPC-Italic AngsanaUPC-Light CordiaUPC-Bold CordiaUPC-BoldItalic CordiaUPC-Italic CordiaUPC-Light EucrosiaUPC-Bold EucrosiaUPC-BoldItalic EucrosiaUPC- Italic EucrosiaUPC-Light FreesiaUPC-Bold FreesiaUPC-BoldItalic FreesiaUPC-Italic FreesiaUPC-Light IrisUPC-Bold IrisUPC-BoldItalic IrisUPC- Italic IrisUPC-Light JasmineUPC-Bold JasmineUPC-BoldItalic JasmineUPC-Italic JasmineUPC-Light KodchiangUPC-Bold KodchiangUPC-BoldItalic KodchiangUPC-Italic KodchiangUPC-Light LilyUPC-Bold LilyUPC-BoldItalic LilyUPC-Italic LilyUPC-Light WaterlilyUPC-Bold WaterlilyUPC- BoldItalic WaterlilyUPC-Italic WaterlilyUPC-Light YuccaUPC-Bold YuccaUPC-BoldItalic YuccaUPC-Italic YuccaUPC-Light For general information on printing Asian language text, refer to i18n_printing(5). Codeset Conversion The following converter pairs are available for converting data between TACTIS and other encoding formats. Refer to iconv_intro(5) for an introduction to codeset conversion. For more information about the other codeset for which TACTIS is the input or output, see the reference page specified in the list item. cp874_TACTIS, TACTIS_cp874 Converting from and to PC code page 874: code_page(5) UCS-2_TACTIS, TACTIS_UCS-2 Converting from and to UCS-2: Unicode(5) UCS-4_TACTIS, TACTIS_UCS-4 Converting from and to UCS-4: Unicode(5) UTF-8_TACTIS, TACTIS_UTF-8 Converting from and to UTF-8: Unicode(5) SEE ALSO
Commands: locale(1) Others: code_page(5), ascii(5), i18n_intro(5), i18n_printing(5), iconv_intro(5), Thai(5), Unicode(5), Wototo(5) TACTIS(5)
All times are GMT -4. The time now is 07:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy