Awk - select from a list


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Awk - select from a list
# 15  
Old 02-07-2008
Perfect !
Thanks a bunch vgersh99
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell Scripting - Select multiple files from numbered list

I am trying to have the user select two files from a numbered list which will eventually be turned into a variable then combined. This is probably something simple and stupid that I am doing. clear echo "Please Select the Show interface status file" select FILE1 in *; echo "Please Select the... (3 Replies)
Discussion started by: dis0wned
3 Replies

2. UNIX for Dummies Questions & Answers

Select distinct sequences from fasta file and list

Hi How can I extract sequences from a fasta file with respect a certain criteria? The beginning of my file (containing in total more than 1000 sequences) looks like this: >H8V34IS02I59VP SDACNDLTIALLQIAREVRVCNPTFSFRWHPQVKDEVMRECFDCIRQGLG YPSMRNDPILIANCMNWHGHPLEEARQWVHQACMSPCPSTKHGFQPFRMA... (6 Replies)
Discussion started by: Marion MPI
6 Replies

3. Shell Programming and Scripting

Select only the lines of a file starting with a field which is matcing a list. awk?

Hello I have a large file1 which has many events like "2014010420" and following lines under each event that start with text . It has this form: 2014010420 num --- --- num .... NTE num num --- num... EFA num num --- num ... LASW num num --- num... (9 Replies)
Discussion started by: phaethon
9 Replies

4. Shell Programming and Scripting

How to use a multiple line list with the select command in ksh?

I copied the below program to play around with displaying a list of items using the select command in ksh. When I put all items in the same line, it works fine. I am trying to use multiple lines instead of a single row...my list is too large for a single line. How do I get the line continuation... (3 Replies)
Discussion started by: haganator
3 Replies

5. Shell Programming and Scripting

How to process select list of files and output to the same file?

Hi, I've a list of files ac_info.tps, subscription_array.tps, .......and many other files one of the file, bin_range_list.tps has the following content CREATE OR REPLACE TYPE "BIN_RANGE_LIST" AS TABLE OF BIN_RANGE_ELEM; / grant execute on... (4 Replies)
Discussion started by: jediwannabe
4 Replies

6. Shell Programming and Scripting

Like to select text in a From/To list

Hi I need help to configure AWK to find a string based From/To filed I have a table like this 0A00 - 0AFF Nuts 0B00 - 0BFF Bolt If I have in a program a value like "0B22" I wold like to get "Bolt" in return. List are in Hex Still try to learn AWK :) (3 Replies)
Discussion started by: Jotne
3 Replies

7. UNIX Desktop Questions & Answers

Script to select a file from a list

i m trying to write a script that will print all the txt files at /home/ directory and will allow a selection of a file and then print the file name. this is what i wrote so far: echo "please select the file from the list " list=$(ls -f *.txt /home/) array=( ) for machine in $list doat... (1 Reply)
Discussion started by: boaz733
1 Replies

8. Shell Programming and Scripting

select data from list

Hi! My data file contains a two columns list. It looks like: 1 3.789 2 6.789 3 7.890 4 8.900 5 6.789 6 1.987 7 10.987 8 2.987 9 0.987 I would like to create a new list using the awk command, just selecting data from the second column but also printing the first column. Let say I select... (3 Replies)
Discussion started by: cris48
3 Replies

9. Shell Programming and Scripting

retrieve what the currently selected item is in a dropdown select list using perl tk

I have a dropdown menu built in perl tk (I am using active state perl). I want to select a value from the dropdown menu and I want to be able to perform some other actions depending upon what value is selected. I have all the graphical part made but I dont know how to get the selected value. Any... (0 Replies)
Discussion started by: lassimanji
0 Replies

10. Shell Programming and Scripting

reappearing menu list using select

is there a way I can make the menu list reappear when I use select ? ----- menulist="Change_title Remove_tag Change_tag Add_line Quit" select word in $menulist #change_title remove_tag change_tag add_line quit do case $word in # first menu option Change Title ... (9 Replies)
Discussion started by: forever_49ers
9 Replies
Login or Register to Ask a Question
IFX_QUERY(3)								 1							      IFX_QUERY(3)

ifx_query - Send Informix query

SYNOPSIS
resource ifx_query (string $query, resource $link_identifier, [int $cursor_type], [mixed $blobidarray]) DESCRIPTION
Sends a $query to the currently active database on the server that's associated with the specified link identifier. For "select-type" queries a cursor is declared and opened. Non-select queries are "execute immediate". For either query type the number of (estimated or real) affected rows is saved for retrieval by ifx_affected_rows(3). If the contents of the TEXT (or BYTE) column allow it, you can also use ifx_textasvarchar(1) and ifx_byteasvarchar(1). This allows you to treat TEXT (or BYTE) columns just as if they were ordinary (but long) VARCHAR columns for select queries, and you don't need to bother with blob id's. With ifx_textasvarchar(0) or ifx_byteasvarchar(0) (the default situation), select queries will return BLOB columns as blob id's (integer value). You can get the value of the blob as a string or file with the blob functions (see below). PARAMETERS
o $query - The query string. o $link_identifier - The link identifier. o $cursor_def - This optional parameter allows you to make this a scroll and/or hold cursor. It's a bitmask and can be either IFX_SCROLL, IFX_HOLD, or both or'ed together. I you omit this parameter the cursor is a normal sequential cursor. o $blobidarray - If you have BLOB (BYTE or TEXT) columns in the query, you can add a $blobidarray parameter containing the corresponding "blob ids", and you should replace those columns with a "?" in the query text. RETURN VALUES
Returns valid Informix result identifier on success, or FALSE on errors. EXAMPLES
Example #1 Show all rows of the "orders" table as a HTML table <?php ifx_textasvarchar(1); // use "text mode" for blobs $res_id = ifx_query("select * from orders", $conn_id); if (! $res_id) { printf("Can't select orders : %s <br />%s<br /> ", ifx_error(), ifx_errormsg()); die; } ifx_htmltbl_result($res_id, "border="1""); ifx_free_result($res_id); ?> Example #2 Insert some values into the "catalog" table <?php // create blob id's for a byte and text column $textid = ifx_create_blob(0, 0, "Text column in memory"); $byteid = ifx_create_blob(1, 0, "Byte column in memory"); // store blob id's in a blobid array $blobidarray[] = $textid; $blobidarray[] = $byteid; // launch query $query = "insert into catalog (stock_num, manu_code, " . "cat_descr,cat_picture) values(1,'HRO',?,?)"; $res_id = ifx_query($query, $conn_id, $blobidarray); if (! $res_id) { /* ... error ... */ } // free result id ifx_free_result($res_id); ?> SEE ALSO
ifx_connect(3). PHP Documentation Group IFX_QUERY(3)