Unix Technical Forum

Re: ksh scripting: unexpected `@'

This is a discussion on Re: ksh scripting: unexpected `@' within the lucky.openbsd.misc forums, part of the OpenBSD category; --> ---- Original message ---- >Date: Thu, 10 Aug 2006 22:28:27 +0200 >From: Alexander Hall <alexander@beard.se> >Subject: Re: ksh scripting: ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > lucky.openbsd.misc

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-18-2008, 06:11 AM
Jacob Yocom-Piatt
 
Posts: n/a
Default Re: ksh scripting: unexpected `@'

---- Original message ----
>Date: Thu, 10 Aug 2006 22:28:27 +0200
>From: Alexander Hall <alexander@beard.se>
>Subject: Re: ksh scripting: unexpected `@'
>To: dick@uchicago.edu
>Cc: misc@openbsd.org
>

....
>Don't know if I get you right, but I'd try quoting the parameter
>substitution, e.g.
>
> ADMIN="admin@example.com"
> ...
> gpg -e -r "$ADMIN" "$ROOT/$HOST/$FN"
>


thx for the suggestions all, i've fixed the issue. the trouble was that i had an
if statement that was evaluating $ADMIN like so:

if [[ $ADMIN -ne "" ]]; then

this likely had the @ being interpreted as a regexp. i changed it to

if [ -n "$ADMIN" ]; then

and that tests the empty string. i'll post the script after i've optimized it
further and added better debugging outputs.

cheers,
jake

>/Alexander


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:09 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com