[EMAIL PROTECTED]:~$ for i in `echo "0019,0314,None,0416,0515"|sed -e
's|,|\n|g'`
> do
> if echo $i|grep [0-9] >/dev/null
> then
> echo ws_$i
> fi
> done
ws_0019
ws_0314
ws_0416
ws_0515

-- 
~Regards
Srinivas

On Dec 17, 2007 5:46 PM, Sumit Upadhyay <[EMAIL PROTECTED]> wrote:

>   Hi,
>
> ",0019,0314,None"
>
> Above is the String I have.
> Now I want it to convert it into something.
> "wxyz_0019 wxyz_0314"
> "None" should be ignored.
> a 4 digit valid number should be used only.
> `echo $VAR |cut -d, -f2 can give one of them.
>
> The given string is not fix.
> It may be sometimes ",0019,0314,None,0416,0515"
> Then resulted string should be "wxyz_0019 wxyz_0314 wxyz_0416 wxyz_0515".
>
> I can do this quite easily in Perl.
> But i need to do this in Korn Shell.
>
> appreciate the response.
>
> thanks
> Sumit

Reply via email to