02-08-2014
Dear tukuyomi,
thank you for you help. The problem is that my item list contains a few hundred entries for each position. Meaning at position $7 I have over 400, at position $8 there are about 100 and $9 has > 800. Any idea how I could do this?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
i need to search a word in the tar file. if it is present just give me the file name please help me (1 Reply)
Discussion started by: junkbuster
1 Replies
2. Shell Programming and Scripting
Hi All,
I have a file with following list.
example 1
========
cat 1.txt
--------
0000cab4752c
0000dab47c2c
...
...
...
Also i have another file 2.txt in which the data is in this format as shown:
cat 2.txt
---------... (6 Replies)
Discussion started by: imas
6 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I have two files. file1 contents:
aaa bbb ccc ddd
eee fff ggg ddd
www eee ggg dde
qqq zzz hhh ddd
file2 contents:
mmm
mmm
mmm
mmm
Now I want to add file2 contents to end of lines in file1 where a line contains pattern "ddd" and it should look like this:
file3 contents:
aaa... (3 Replies)
Discussion started by: harjitsingh
3 Replies
4. Shell Programming and Scripting
Hi,
I have 2 files like below.
File A:
apple
mango
File B:
start
abc
def
apple
ghi
end
start
cba
fed (4 Replies)
Discussion started by: jayadanabalan
4 Replies
5. Shell Programming and Scripting
Hi there, i have an /etc/hosts file that is organised in sections, like this
#
# Oracle Servers
#
1.1.1.1 boxa
2.2.2.2 boxb
9.9.9.9 boxj
#
# Prod Sybase Servers
#
6.6.6.6 boxt
4.4.4.4 boxz
I am just trying to write a line of code that will ill be able to pass the comment block... (3 Replies)
Discussion started by: hcclnoodles
3 Replies
6. UNIX for Dummies Questions & Answers
Hi All,
I have the Overview.csv file like below format
Message ID Sendout Group Name Email Subject Name Type Rcpts Responses Response Rate Open Rate Click Rate
2000009723 01-22-2014 16:14 Test_GroupPQA2013 000123@yahoo.com INFO RISQUE D'INONDATION... (3 Replies)
Discussion started by: armsaran
3 Replies
7. UNIX for Dummies Questions & Answers
Hi,
Now I have: /Users/okn/bin for my private shell scripts.
How do I add /Users/okn/bin to my PATH?
The PATH is right now:
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
The .bash_profile doesn't state anything about a PATH (yet).
I read about this:
PATH=/bin:$PATH
export PATH
or... (1 Reply)
Discussion started by: OmarKN
1 Replies
8. Shell Programming and Scripting
I have a file
cat /root/file
#import node1
#import node2
import node2
import node4
After sed/awk operation the file should be as follows
cat /root/file
#import node1
#import node2
#import node2
#import node4 (6 Replies)
Discussion started by: anil510
6 Replies
9. Shell Programming and Scripting
Hi there,
I am new to Unix and had below requirement to finish my task.
I have file1.dat which has data as shown below.
case1.txt
case2.txt
case3.txt
case4.txt
file1.dat has only file names
I have folder which has above files mentioned in file1.dat
./all_files
case1.txt... (6 Replies)
Discussion started by: raj028
6 Replies
10. UNIX for Beginners Questions & Answers
Hello,
I am searching the following string Folder^ in a file and replacing it with Folder^/
However if the file already contains Folder^/ I want to avoid replacing it with Folder^//
To do this I have to do the following today:
1) echo "Folder^" | sed 's/Folder\^/Folder\^\//g'
I get... (2 Replies)
Discussion started by: mehimadri12
2 Replies
LEARN ABOUT OSF1
xmlistreplaceitemspos
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)