![]() |
|
|
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 |
| converting ksh scripts--.bat in window's | 2.5lt V8 | Windows & DOS: Issues & Discussions | 3 | 11-28-2006 07:23 PM |
| Converting UNIX scripts to DOS | Crozz | Windows & DOS: Issues & Discussions | 2 | 11-28-2006 11:33 AM |
| Converting csv to xls | miltony | Shell Programming and Scripting | 1 | 12-05-2005 02:08 AM |
| Converting Text File into XML using Unix Shell Scripts | Laud12345 | Shell Programming and Scripting | 10 | 02-16-2005 01:35 PM |
| converting kb to mb | csaunders | UNIX for Dummies Questions & Answers | 1 | 02-26-2004 04:14 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
converting ksh scripts to sh
Hello All,
I have a whole bunch of shell scripts written in a ksh environment and which successfully execute there. However, I found out that they eventually need to be used in a sh environment. So some commands like some_variable=$(some_command) fail because sh doesn't understand $(.....). I identified a list of scripts that have the $(.....) statements. Now I have to replace all those with `.....` There must be someway I can automate this find and replace action right? Can you please point me in the right direction? Can I use sed for it? If so, what is the exact command? I can identify the statements using the regex '\$(.*)' but I don't know how to replace the command with `...` I guess I have to parse each line of each file in a loop and do the substitution but I don't know the substituion command. Thanks in advance for ur help. ![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|