![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Break a file into separate files | chiru_h | Shell Programming and Scripting | 8 | 07-29-2008 12:06 AM |
| How to separate 0kb files from the rest!!! | kumarsaravana_s | Shell Programming and Scripting | 3 | 04-02-2007 05:38 AM |
| to separate a specific pattern | shriashishpatil | Shell Programming and Scripting | 11 | 03-06-2006 05:04 AM |
| separate out the column | ust | Shell Programming and Scripting | 6 | 12-29-2005 04:11 AM |
| How to separate a variable | whatisthis | Shell Programming and Scripting | 4 | 11-02-2004 10:49 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Separate string
i am a biginner of shell scripting.please help me how can i seperate a string in two parts.eg.user given sting is"oi2ehello".i want to make 2 string string1=oi2e and string2=hello
Last edited by arghya_owen; 05-12-2008 at 06:22 AM. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Code:
var=testing
echo ${#var}
|
|
#3
|
|||
|
|||
|
Code:
#!/bin/ksh
> var="oi2ehello"
> echo "${var%%????} ${var##????}" | read var1 var2
> echo $var1 $var2
oi2eh hello
|
|
#4
|
|||
|
|||
|
thanks a lot.....
|
|||
| Google The UNIX and Linux Forums |