hi, echo ",0019,0314,None,0416,0515" | tr ',' '\012' | grep '^[0-9][0-9][0-9][0-9]$' | sed 's/^/wxyz_/' | tr '\012' ' '
Aditya ----- Original Message ---- From: Sumit Upadhyay <[EMAIL PROTECTED]> To: [email protected] Sent: Monday, December 17, 2007 5:46:11 PM Subject: [twincling] Korn shell query 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

