zsh-users
 help / color / mirror / code / Atom feed
* Re: escaping a colon in a function
@ 1997-09-05 23:37 Wolfgang Hukriede
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Hukriede @ 1997-09-05 23:37 UTC (permalink / raw)
  To: zsh-users, kutek


zsh-3.0.2> x=addr:0.0.0.0
zsh-3.0.2> echo ${x##addr:}
0.0.0.0

apparently works. No escaping of the colon is necessary at all.

Greetings, Wolfgang.

--
kutek@cybercomm.net wrote:
>  i have read the docs and i have not found therein a way to escape a
>  colon within a function.
>
>  what i am doing is parsing the output of ifconfig to get my currently
>  active ip address.the ouput of that function is in the form
>
>       addr:0.0.0.0
>
>  and i am attempting to use the ${name##pattern} construct to remove the
>  "addr:" from the ultimate output. unfortunately,zsh seems to be interpreting
>  the colon in the pattern as a delimiter and complains that there is no
>  closing brace in the function. i have tried both single and double quotes
>  as well as the backslash to escape the colon's special meaning..to no avail.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* escaping a colon in a function
@ 1997-09-05 11:56 kutek
  0 siblings, 0 replies; 2+ messages in thread
From: kutek @ 1997-09-05 11:56 UTC (permalink / raw)
  To: zsh-users

hello,

i have read the docs and i have not found therein a way to escape a 
colon within a function.

what i am doing is parsing the output of ifconfig to get my currently 
active ip address.the ouput of that function is in the form 

     addr:0.0.0.0

and i am attempting to use the ${name##pattern} construct to remove the
"addr:" from the ultimate output. unfortunately,zsh seems to be interpreting 
the colon in the pattern as a delimiter and complains that there is no 
closing brace in the function. i have tried both single and double quotes 
as well as the backslash to escape the colon's special meaning..to no avail.

Any suggestions? TIA.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1997-09-05 23:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-09-05 23:37 escaping a colon in a function Wolfgang Hukriede
  -- strict thread matches above, loose matches on Subject: below --
1997-09-05 11:56 kutek

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).