08-31-2014
Maybe use perl instead, uses hash arrays use unique to remove redundant elements.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi, everybody.
I just wonder whether there are a couple of free Linux servers running as terminals where people can practice Unix Shell Programming?
I'd like to set up one myself but unfortunatly can't do it. I can't switch to Linux now coz I run a couple of servers on my machine.
Cygwin is... (3 Replies)
Discussion started by: belgampaul
3 Replies
2. News, Links, Events and Announcements
About 4 years ago I wrote this tool inspired by Rob Urban's collect tool for DEC's Tru64 Unix. What makes this tool as different as collect was in its day is its ability to run at a low overhead and collect tons of stuff. I've expanded the general concept and even include data not available in... (0 Replies)
Discussion started by: MarkSeger
0 Replies
3. Shell Programming and Scripting
I am doing the following script in k shell
sed -i 's/FILENAME/$i/g' TEST/test$j.ctl > TEST/control$j.ctl
In the file it replaces $i for all FILENAME, it doesnot replace with the value of i. I put single quotes like below
sed -i 's/FILENAME/'$i'/g' TEST/test$j.ctl > TEST/control$j.ctl
I... (9 Replies)
Discussion started by: toshidas2000
9 Replies
4. UNIX for Advanced & Expert Users
We develop software for diagnostic tools for cars. we a use a portable PC(x86) runs Win98 to run our applications.
Hence the working environment in the company is Windows, specifically we use BASIC to develop the GUI, communication functions, DLL, etc. and run them on the Win98 PC.
We suggested... (1 Reply)
Discussion started by: raedbenz
1 Replies
5. UNIX for Advanced & Expert Users
Hello All,
Request any one of Unix/Linux masters to clarify on the below.
How far it is feasible to open a new ftp connection for transferring each file when there are multiple files to be sent. I have developed shell script to send all files at single stretch but some how it doesnt suit to... (3 Replies)
Discussion started by: RSC1985
3 Replies
6. UNIX for Dummies Questions & Answers
One of our database server is suddenly became very slow and i have no clue what to do .Please help. I m sharing the performance inforamtion regarding cpu,harddisk,ram .
########CPU Information########
Machine Uptime Information:
uptime
10:25:06 up 16:50, 1 user, load average: 5.84, 5.65,... (10 Replies)
Discussion started by: pinga123
10 Replies
7. Shell Programming and Scripting
Hi,
I have been working on Sun Solaris since a long time. Recently I got to work on RH Linux. My Linux version details are:
Linux 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
I have a simple command in my shell script:
export BKPTAG=`date... (3 Replies)
Discussion started by: sagarparadkar
3 Replies
8. Red Hat
IN solaris, for network high-availability we are using IPMP concept, can u tell me in REDHAT LINUX what we are using... also pls share good step to read & understand the that concept...
Also performance issue in linux what are step & cmd can u tell me??? (2 Replies)
Discussion started by: tiger09
2 Replies
9. Shell Programming and Scripting
Hi All,
I am facing performance issue while rinning the LINUX shell script.
I have file1 and file 2. File one is the source file and file 2 is lookup file. Need to replace if the pattern is matching in file1 with file2.
The order of lookup file is important as if any match then exit... (8 Replies)
Discussion started by: ureddy
8 Replies
10. Shell Programming and Scripting
Hi,
I am beginner in shell scripting. I have written a script to parse file(s) having large number of lines each having multiple comma separated strings.
But it seems like script is very slow. It took more than 30mins to parse a file with size 120MB (523564 lines), below is the script code
... (4 Replies)
Discussion started by: imrandec85
4 Replies
LEARN ABOUT OSX
tie::hash::namedcapture
Tie::Hash::NamedCapture(3pm) Perl Programmers Reference Guide Tie::Hash::NamedCapture(3pm)
NAME
Tie::Hash::NamedCapture - Named regexp capture buffers
SYNOPSIS
tie my %hash, "Tie::Hash::NamedCapture";
# %hash now behaves like %+
tie my %hash, "Tie::Hash::NamedCapture", all => 1;
# %hash now access buffers from regexp in $qr like %-
DESCRIPTION
This module is used to implement the special hashes "%+" and "%-", but it can be used to tie other variables as you choose.
When the "all" parameter is provided, then the tied hash elements will be array refs listing the contents of each capture buffer whose name
is the same as the associated hash key. If none of these buffers were involved in the match, the contents of that array ref will be as many
"undef" values as there are capture buffers with that name. In other words, the tied hash will behave as "%-".
When the "all" parameter is omitted or false, then the tied hash elements will be the contents of the leftmost defined buffer with the name
of the associated hash key. In other words, the tied hash will behave as "%+".
The keys of "%-"-like hashes correspond to all buffer names found in the regular expression; the keys of "%+"-like hashes list only the
names of buffers that have captured (and that are thus associated to defined values).
SEE ALSO
perlreapi, re, "Pragmatic Modules" in perlmodlib, "%+" in perlvar, "%-" in perlvar.
perl v5.16.2 2012-10-11 Tie::Hash::NamedCapture(3pm)