Seems to be an issue with escape chars not being processed as expected, 
and newline's not being removed.

I have added "-ne" to the three echo commands below to force echo to 
supress newline and evaluate escape chars.

There were still newlines in the $file variable so I changed s/\n// to 
s/[\r\n]//g to strip out all carriage returns and newlines as there 
shouldnt be either in $url or $path.

Now works for me.

url=`echo -ne "$needed" | cut -d\| -f3 | tr '~' ' ' | perl -pe 
's/[\r\n]//g;s/^ *//;s/ *$//'`
file=`echo -ne "$needed" | cut -d\| -f4 | tr '~' ' '  | perl -pe 
's/[\r\n]//g;s/^ *//;s/ *$//;s/([^\/]*\/*)$/lc($1)/eg'`
path=`echo -ne "$file" | perl -pe 's#(.*/).*#$1#'`

This email originates from Steria*.  It, and any attachments, may contain 
confidential information and may be subject to copyright or other intellectual 
property rights. It is only for the use of the addressee(s). You may not copy, 
forward, disclose, save or otherwise use it in any way if you are not the 
addressee(s) or responsible for delivery.
If you receive this email by mistake, please advise the sender and cancel it 
immediately.
Steria may monitor the content of emails within its network to ensure 
compliance with its policies and procedures.
Any email is susceptible to alteration and its integrity cannot be assured. 
Steria shall not be liable if the message is altered, modified, falsified, or 
edited.
_________________________________________________________________________________________________________________________________
*       Steria Limited, number 4077975;
Steria Services Limited,  number 2706218;
Steria Recruitment Limited, number 1437998.
Registered in England and Wales; registered office Three Cherry Trees Lane, 
Hemel Hempstead, Hertfordshire HP2 7AH
www.steria.co.uk.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
unattended-info mailing list
unattended-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unattended-info

Reply via email to