![]() |
|
|
|
|
|||||||
| 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 |
| adding order number in the output file | happyv | Shell Programming and Scripting | 20 | 03-12-2007 10:12 PM |
| reversing order of lines in a file | gfhgfnhhn | Shell Programming and Scripting | 11 | 03-04-2007 11:14 PM |
| HELP !! Builting string in incremental order | u263066 | Shell Programming and Scripting | 6 | 08-14-2006 02:50 AM |
| Reversing and trim a String through SHELL script | DeepakXavier | Shell Programming and Scripting | 5 | 09-28-2005 06:25 AM |
| Reversing file order using SED | MBGPS | Shell Programming and Scripting | 2 | 09-30-2002 06:43 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
output string in reversing order
If I have string { I_love_shell_scripts}
anyone knows how to have output {stpircs_llehs_evol_I} by using shell and perl ?I know in perl, there is reverse() funcation, but can it be done by not using reverse()? |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Looks like homework. Is it? May be you should solve this one on your own.
|
|
#3
|
|||
|
|||
|
this had been already posted
you should have tried with the search option here is the link could u please make a try!!! reversing a string |
|
#4
|
|||
|
|||
|
Quote:
My implementation is a subroutine that contains only 3 statements using a recursive scheme. This is one way. Another way: you can always find the length() of the string, so you know the largest character position is 1 less than that value, then write a loop to read each character backwards with substr(). |
|||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|