|
|
Subject:
simple tcsh script
Category: Computers Asked by: mickr-ga List Price: $10.00 |
Posted:
11 Jul 2006 08:18 PDT
Expires: 10 Aug 2006 08:18 PDT Question ID: 745297 |
I want to convert a string like (a,b,c) into a list a b c in tcsh In tcl I would expect to do something like set a "a,b,c" set b [split $a ,] llength $b <would return 3> How do I do this in tcsh? |
|
There is no answer at this time. |
|
Subject:
Re: simple tcsh script
From: bcwhite-ga on 17 Jul 2006 10:32 PDT |
Most shells don't do too much built-in; they rely on calling outside programs. setenv a "a,b,c" setenv b `echo $a | sed -e 's/,/ /g'` echo $b In my experience, csh is not a good scripting language. If you have the option, I suggest looking at /bin/sh instead. It's standard (on all unix), more powerful, and has better extensions (i.e. "bash"). If you still need more power, go to perl. -- Brian |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |