10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello Experts,
I am trying to write a shell script to find duplicate items in an array, this is what i have tried :
#!/bin/bash
echo "This is another sample Progg to remove duplicate items from an array"
echo "How many number do you want to insert"
read n
for (( i=0; i<$n; i++ ))
do
... (5 Replies)
Discussion started by: mukulverma2408
5 Replies
2. UNIX for Dummies Questions & Answers
Hi,
How can I replace || with space and then remove duplicate from following text?
T111||T222||T444||T222||T555
Thanks in advance (10 Replies)
Discussion started by: tinku981
10 Replies
3. Shell Programming and Scripting
Hi ,
I have a pipe seperated file repo.psv where i need to remove duplicates based on the 1st column only. Can anyone help with a Unix script ?
Input:
15277105||Common Stick|ESHR||Common Stock|CYRO AB
15277105||Common Stick|ESHR||Common Stock|CYRO AB
16111278||Common Stick|ESHR||Common... (12 Replies)
Discussion started by: samrat dutta
12 Replies
4. Shell Programming and Scripting
Hi all,
I have created 3 arrays which can have common elements in each like-
arr_a contains str1 str2 str3 str4 str5
arr_b contains str3 str6 str7 str1 str8
arr_c contains str4 str9 str10 str2
each array is created with "set -A arr_name values" command. I want to create a resultant array-say... (1 Reply)
Discussion started by: sanzee007
1 Replies
5. Shell Programming and Scripting
HI
I have file contains 1000'f of duplicate id's with (upper and lower first character) as below
i/p:
a411532A411532a508661A508661c411532C411532
Requirement: But i need to ignore lowercase id's and need only below id's
o/p:
A411532
A508661
C411532 (9 Replies)
Discussion started by: buzzme
9 Replies
6. Programming
Hello forum ,
Please solve the below queery.
A sorted array which has repated elements.
A = {1,2,3,3,4,5,5,5,6,9,9}
i want to delete the duplicate elements and to genrate a new array.
i need the array sholud be like this
A = {1,2,3,4,5,6,9}.
Please write the piece of code... (4 Replies)
Discussion started by: workforsiva
4 Replies
7. Shell Programming and Scripting
Hi,
I am tryung to use shell or perl to remove duplicate characters
for example , if I have " I love google" it will become I love ggle"
or even "I loveggle" if removing duplicate white space
Thanks
CC (6 Replies)
Discussion started by: ccp
6 Replies
8. Shell Programming and Scripting
Hi all,
I have a text file fileA.txt
DXRV|02/28/2006 11:36:49.049|SAC||||CDxAcct=2420991350
DXRV|02/28/2006 11:37:06.404|SAC||||CDxAcct=6070970034
DXRV|02/28/2006 11:37:25.740|SAC||||CDxAcct=2420991350
DXRV|02/28/2006 11:38:32.633|SAC||||CDxAcct=6070970034
DXRV|02/28/2006... (2 Replies)
Discussion started by: sabercats
2 Replies
9. Shell Programming and Scripting
Hi all,
I have a out.log file
CARR|02/26/2006 10:58:30.107|CDxAcct=1405157051
CARR|02/26/2006 11:11:30.107|CDxAcct=1405157051
CARR|02/26/2006 11:18:30.107|CDxAcct=7659579782
CARR|02/26/2006 11:28:30.107|CDxAcct=9534922327
CARR|02/26/2006 11:38:30.107|CDxAcct=9534922327
CARR|02/26/2006... (3 Replies)
Discussion started by: sabercats
3 Replies
10. Shell Programming and Scripting
i have a text its contain many record, but its written in one line,
i want to remove from that line the duplicate record,
not record have fixed width ex: width = 4
inputfile test.txt =abc cdf abc abc cdf fgh fgh abc abc
i want the outputfile =abc cdf fgh
only those records
can any one help... (4 Replies)
Discussion started by: kazanoova2
4 Replies