Sponsored Content
Full Discussion: translate rc to string
Top Forums Shell Programming and Scripting translate rc to string Post 302206560 by ynir on Wednesday 18th of June 2008 03:55:45 AM
Old 06-18-2008
Lightbulb found myself something nice

Code:
local RET_ARR=("Object is not mapped" "Operation Internal Error" "Operation Invalid Arguments" "Object is mapped" "Path not found")
...
echo "bla bla.. ret is [${RET}] - ${RET_ARR[${RET}]}"

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Can someone help translate this snippet?

Hello all - This snippet from a script runs on a Tru64 machine (ksh). if ps -ef | grep thing1 | grep dtsession | grep -v grep then echo "Killing Thing1 desktop session" kill -9 'ps -ef | grep thing1 | grep dtsession | grep -v grep | awk '{FS = " "}{print $2}'' fi I'm... (7 Replies)
Discussion started by: Heron
7 Replies

2. Shell Programming and Scripting

how to achicve translate in unix

hi, i have file with 4 columns, the first column contains 10 numbers. i want to replace t the numbers (u can say i want to use cryptography). i want to replace 1 with 4, 2 with 5, 3 with 9..... how can i achieve this in unix. :confused: (1 Reply)
Discussion started by: javeed7
1 Replies

3. UNIX for Dummies Questions & Answers

translate to normal english

lnode * head = temp; (1 Reply)
Discussion started by: rickym2626
1 Replies

4. Shell Programming and Scripting

replcement/translate of ' to ''

Hi i have a variable whose value contains '(single quote) i want to replace single quote with two single quotes ex- i want to replace abc's second center with abc''s second center. Plz help me. thanks (2 Replies)
Discussion started by: bmrout007
2 Replies

5. UNIX for Dummies Questions & Answers

translate timestamp

my file creation timestamp looks like this: Nov 4 15:44:34 EST 2009 i need to translate into 091104 my way is to awk on $1, $2, $5, but i don't know how to tranlate Nov to 11 ---------- Post updated at 03:01 PM ---------- Previous update was at 11:07 AM ---------- i resolved my post... (0 Replies)
Discussion started by: tjmannonline
0 Replies

6. UNIX for Dummies Questions & Answers

Help translate code

Hi, all of you!!! I have this code and I won to build-in some more code. I know this is a lot of code. if ; then if ; then SYSROOT="$1" S_SCRIPT="cd $1 ; ./etc/rc.sysinit 2>&1 &" fi else ... (22 Replies)
Discussion started by: jokerper
22 Replies

7. Shell Programming and Scripting

translate this string

Hi, I'm using code below to assign title for Putty Window to show user@hostname+curr directory. Trying to read this "write only" language, can anybody help me to go thru this string, too many thing in it I can't expaing Tx T export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}:... (1 Reply)
Discussion started by: trento17
1 Replies

8. Shell Programming and Scripting

Translate from english to french

Hi, I wrote a script to convert a given word from English to French. But I am not able to figure out what I am missing here. I am not able to get the translated word Below is my script: French=/root/dict/entofr.txt for i in $* do word="echo $word $i" done while: do cat <<... (1 Reply)
Discussion started by: pinky7630
1 Replies

9. Shell Programming and Scripting

Tr--translate is throwing an error

Dear all, I would like to count the no;of word "INFORMATION" in a file called alt.lst and output to a unix variable INFORMATION.so to do this I wrote the below code INFORMATION=echo 'INFORMATION' | tr -cs 'A-Za-z' '\n' < /app/tisq005/01/home/tisq005b/scripts/alt.lst | grep -c "INFORMATION"... (2 Replies)
Discussion started by: Kiransagar
2 Replies

10. Shell Programming and Scripting

Translate grep to awk

sed -n "2,10p" lfile | egrep error | egrep -vc memory sed -n "2,10p" lfile | egrep error | egrep -v memory sed -n "2,10p" lfile | egrep error | egrep -c memory sed -n "2,10p" lfile | egrep error | egrep memory above are four separate commands. i want to combine the grep in each... (7 Replies)
Discussion started by: SkySmart
7 Replies
Set::Object::Weak(3)					User Contributed Perl Documentation				      Set::Object::Weak(3)

NAME
Set::Object::Weak - Sets without the referant reference increment SYNOPSIS
use Set::Object::Weak qw(weak_set); my $set = Set::Object::Weak->new( 0, "", {}, [], $object ); # or my $set = weak_set( 0, "", {}, [], $object ); print $set->size; # 2 - the scalars aren't objects DESCRIPTION
Sets, but weak. See "weaken" in Set::Object. Note that the "set" in "Set::Object::Weak" returns weak sets. This is intentional, so that you can make all the sets in scope weak just by changing "use Set::Object" to "use Set::Object::Weak". CONSTRUCTORS
new This class method is exactly the same as "Set::Object->new", except that it returns a weak set. weak_set( ... ) This optionally exported function is a shortcut for saying "Set::Object::Weak->new(...)". set( ... ) This method is exported so that if you see: use Set::Object qw(set); You can turn it into using weak sets lexically with: use Set::Object::Weak qw(set); Set::Object 1.19 had a bug in this method that meant that it would not add the passed members into it. SEE ALSO
Set::Object CREDITS
Perl magic by Sam Vilain, <samv@cpan.org> Idea from nothingmuch. perl v5.12.1 2008-10-12 Set::Object::Weak(3)
All times are GMT -4. The time now is 12:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy