Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
chop in kornshell?
Name: ShaqDiesel Date: July 19, 2005 at 16:48:59 Pacific OS: windows CPU/Ram: amd; 384
Comment:
I have the following string filename(only has one double quote at end): 'arto.py"' I want sed to do a search and replace something with "Results/arto.py". I tried the following but it complained because of the last quotation mark. sed -e "s/^filename=.*/filename=\"Results/$filename/g" $I > temp ($I is the current file in a loop) Does kornshell have a chop command like PERL? I could solve this problem by chopping off that trailing " so sed doesnt complain and just hardcode both quotes as part of the replacement string Any ideas? Thanks.
Summary: Does exist in kornshell a command like DOS "goto" to skip some steps and go to a determinated place on a script? Could somebody tell me if there's way with if then sentences to do that (for exemple ...
Summary: Get a copy of "The New Kornshell" by Morris I. Bolsky and David G. Korn. On page 276 is a version of the grep command written in Kornshell. You can use the logic in the example as a start point. It...
Summary: It depends on which shell you are running. In KornShell you might do something like this: integer total=0 integer num feed the numbers into a loop and add them up. ((total = total + num)) If your runn...