![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| Korn pattern-list with a variable | partchimp | Shell Programming and Scripting | 2 | 03-26-2008 02:12 PM |
| compound variable in korn shell | ZINGARO | Shell Programming and Scripting | 5 | 10-03-2007 10:57 AM |
| compound variable in korn shell | ZINGARO | Shell Programming and Scripting | 0 | 08-30-2007 11:30 AM |
| how to convert from korn shell to normal shell with this code? | forevercalz | Shell Programming and Scripting | 21 | 11-23-2005 02:18 AM |
| does this variable call work--Korn | morkfard | UNIX for Dummies Questions & Answers | 2 | 07-10-2001 10:59 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Finding Occurence of comma in a Variable ( KORN Shell)
All
I want to find the occurence of comma in a variable in KORN shell. For example : var = test,test2,test3 .... finding occurence of comma in this variable. Result = 3 now. Please help me to write the code. Thanks in advance. Regards Deepak |
|
|||||
|
Quote:
Code:
echo $var | tr -c -d "," | wc -c |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|