The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
script or piece of code where the data returned by a stored procedure you are writing enigma_83 Shell Programming and Scripting 3 04-25-2008 07:44 AM
Where can I review the source code? Aaron Van UNIX for Dummies Questions & Answers 1 09-08-2007 03:58 AM
Can someone review my code tell me where I am going wrong? chrchcol Shell Programming and Scripting 4 07-28-2006 07:54 PM
what does this piece of code do? Vikas Sood Shell Programming and Scripting 3 06-05-2006 05:28 PM
Can some review my code would be appreicated? sibghat Shell Programming and Scripting 1 09-29-2005 04:51 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 07-20-2005
anypager anypager is offline
Registered User
  
 

Join Date: Jul 2005
Posts: 10
a piece of code, plz help to review

use "getopts" to get params from command. Need replace black with a specified string like "%20

DEFAULT_DELIM=%20
...
while getopts dek:f:t:vh OPTION
do
case $OPTION in
t)
DELIM=`tvar=/'"$OPTARG"'/ svar="$DEFAULT_DELIM" awk 'BEGIN{T=ENVIRON["tvar"];S=ENVIRON["svar"]; while(index(T,S)!=0){S=S"0"};print $S;exit}'`
for var in $OPTARG
do
if [ "$TMP" = "" ]
then
TMP=$var
else
TMP=$TMP$DELIM$var
fi
done
;;
...

Why DELIM is always null

Thanks.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:30 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0