Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xmlistreplaceitemspos(3x) [osf1 man page]

XmListReplaceItemsPos(3X)												 XmListReplaceItemsPos(3X)

NAME
XmListReplaceItemsPos - A List function that replaces the specified elements in the list SYNOPSIS
#include <Xm/List.h> void XmListReplaceItemsPos (widget, new_items, item_count, position) Widget widget; XmString *new_items; int item_count; int position; DESCRIPTION
XmListReplaceItemsPos replaces the specified number of items of the List with new items, starting at the specified position in the List. When the items are inserted into the list, they are compared with the current XmNselectedItems list. If any of the new items matches an item on the selected list, it appears selected. Specifies the ID of the List widget. Specifies the replacement items. Specifies the num- ber of items in new_items and the number of items in the list to replace. This number must be non-negative. Specifies the position of the first item in the list to be replaced. A value of 1 indicates that the first item replaced is the first item in the list; a value of 2 indicates that it is the second item; and so on. Beginning with the item specified in position, item_count items in the list are replaced with the corresponding elements from new_items. That is, the item at position is replaced with the first element of new_items; the item after position is replaced with the second element of new_items; and so on, until item_count is reached. For a complete definition of List and its associated resources, see XmList(3X). SEE ALSO
XmList(3X) XmListReplaceItemsPos(3X)

Check Out this Related Man Page

XmListReplaceItemsPosUnselected(library call)							     XmListReplaceItemsPosUnselected(library call)

NAME
XmListReplaceItemsPosUnselected -- A List function that replaces items in a list without selecting the replacement items SYNOPSIS
#include <Xm/List.h> void XmListReplaceItemsPosUnselected( Widget widget, XmString *new_items, int item_count, int position); DESCRIPTION
XmListReplaceItemsPosUnselected replaces the specified number of items in the list with new items, starting at the given position. The replacement items remain unselected, even if they currently appear in the XmNselectedItems list. widget Specifies the ID of the List widget to replace items in. new_items Specifies a pointer to the replacement items. item_count Specifies the number of elements in new_items and the number of items in the list to replace. This number must be nonnegative. position Specifies the position of the first item in the list to be replaced. A value of 1 indicates that the first item replaced is the first item in the list; a value of 2 indicates that it is the second item; and so on. Beginning with the item specified in position, item_count items in the list are replaced with the corresponding elements from new_items. That is, the item at position is replaced with the first element of new_items; the item after position is replaced with the second element of new_items; and so on, until item_count is reached. For a complete definition of List and its associated resources, see XmList(3). RELATED
XmList(3). XmListReplaceItemsPosUnselected(library call)
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Comparing items in 2 files

Hi, I have 2 files with contents in them and I need to compare each item in each file. File1: item4 item5 File2: item2 item3 item5 item6 The items names can be of different lengths. If the items in the File1 are not in File2, delete the missing item in File1. The resulting... (12 Replies)
Discussion started by: ReV
12 Replies

2. Shell Programming and Scripting

sending control c in the loop

I want to go through the list of items and run it. while running it, some of them will have either >there is no response # and then end it... so that it can go to next item OR >there is response # but in order to break out of it, u need to do Control c. How do you send control... (6 Replies)
Discussion started by: hankooknara
6 Replies

3. Shell Programming and Scripting

want to replace some words with other from a list

I have a list file, in which both the words to be replaced and to be replaced with are there... need to run a script which will accept the list name and replace all the occurances .. ex. the list file contains something like hi=bye go=come Now i want to replace the words hi with bye and go... (3 Replies)
Discussion started by: dixitked
3 Replies

4. Shell Programming and Scripting

Plain Text List to HTML List

Hello, I am trying to take a simple list (from echo, not a file) and turn it into a list with HTML codes. List item one. List item two. List item three. to <ol> <li>List item one.</li> <li>List item two.</li> <li>List item three.</li> </ol> The list is coming in via echo on... (4 Replies)
Discussion started by: QuestunAthority
4 Replies

5. UNIX for Dummies Questions & Answers

replace 0 with R at position 40

i have this contents: H,0100, 4022,FISHER810,6109566,,,,,0,562032, D,0100, 4022,FISHER810,6109566,,1,,,0,562032 if i see 0 at position 40, i want to replace with R. (7 Replies)
Discussion started by: tjmannonline
7 Replies

6. Shell Programming and Scripting

Compare 2 files

HI I have a list of items in 2 files. Some items are present in both the files in any order. Say for example item name is 'apple', it may be present in line 2 of file 1 and line 10 of file 2. I want to see the missing items only. In simple terms, Items present in file1 if not in file2 then... (5 Replies)
Discussion started by: PrasannaKS
5 Replies

7. UNIX for Dummies Questions & Answers

replace position

my file: S10000000146981+0000003113079+0000000096981 i'd like to copy position 31-44, and paste onto position 3-16 i'd like to replace position 31-44 with 0 (zero) my final file should look like this: S10000000096981+0000003113079+0000000000000 thanks in advanced. (10 Replies)
Discussion started by: tjmannonline
10 Replies

8. Shell Programming and Scripting

Replacing content from a list

Okay, so I am not quite sure the best way of going about this. I have a whole stack of files that need items replaced with a code corresponding to it. In particular, I am looking to replace the names of countries with the two letter iso country code. The files themselves are in csv format with... (4 Replies)
Discussion started by: johnlee
4 Replies

9. Shell Programming and Scripting

Sed -f alternatives?

I have a list of items (control file) that I want to substitute in a text file, and it's BIG. The file has two items, the original, and the new: A B B C D E The file has something like 10,000 entries. So in the oldfile.txt, I'd like to basically make all these expression matched... (9 Replies)
Discussion started by: twoblink
9 Replies

10. UNIX for Dummies Questions & Answers

[Solved] Delete files with condition

I have a directory containing thousands of items “video files”, these items were generated by an application, which generates two items with the same name but with different extensions “.avi and .mp4”. There was a tool in my application to remove one item @ a time. Later I found this tool removes... (5 Replies)
Discussion started by: awadeid
5 Replies

11. Shell Programming and Scripting

Read from "list1" and list matches in "list2"

I want to print any matching IP addresse in List1 with List 2; List 1 List of IP addresses; 161.85.58.210 250.57.15.129 217.23.162.249 74.76.129.101 30.221.177.237 3.147.200.59 170.58.142.64 127.65.109.33 150.167.242.146 223.3.20.186 25.181.180.99 2.55.199.32 (3 Replies)
Discussion started by: lewk
3 Replies

12. Shell Programming and Scripting

How can I set up this loop?

I want to compare two files. I think using grep is the way to go but I do not know how to set this up. Let me show an example: File1 has 1000 items, File2 has 700 items I need to take the first item in File1 and search the entire contents of File2 to see if there is a match there. IF there is a... (3 Replies)
Discussion started by: castrojc
3 Replies

13. AIX

List LPAR from VIOS

Hi guys, does anyone know how to get a list of the LPAR running on VIOS? Thanks! (5 Replies)
Discussion started by: cecco16
5 Replies

14. UNIX for Dummies Questions & Answers

Bash script to sort files

I've got a disorganized list of items and quantities for each. I've been using a combination of grep and sort to find out how much to buy of each item. I'm tired of having to constantly using these commands so I've been trying to write a shell script to make it easier, but I can't figure out how... (3 Replies)
Discussion started by: PTcharger
3 Replies

15. Shell Programming and Scripting

Associative Array with more than one item per entry

Hi all I have a problem where i have a large list ( up to 1000 of items) and need to have 2 items pulled from it into variables in a bash script my list is like the following and I could have it as an array or possibly an external text file maintained separately. Every line is different and... (6 Replies)
Discussion started by: kcpoole
6 Replies