Re: Removing "\n" from a list of files

From: Justin Dearing (jdearing_at_cuthbeat.com)
Date: 09/15/03


Date: 15 Sep 2003 05:42:51 -0700

Michael Heiming <michael+USENET@www.heiming.de> wrote in message news:<ki51kb.lld.ln@news.heiming.de>...
> Justin Dearing <jdearing@cuthbeat.com> wrote:
> > Hello all. I have a bunch of IIS servers that I must archive the zips
> > by month and have written the following script to aid the task.
>
> Unsure, what you are trying, but then does IIS run on *nix?
>
> Best bet, install a real OS/web-server and try:
> man logrotate

Ok let me rephrase, my employeer has severall IIS web servers. These
servers are not going away. Now let me ask the question in a way that
takes the IIS element out of the picture.

I have a a shell script. It first does a "curl -l ${FTP_URL} >
folders.txt"
Now folders.txt looks like this afterwards:
W3SVC1
W3SVC10
W3SVC42

etc etc.

A few lines later the following happens:

for FOLDER in `cat ${SERVERNAME}/folders.txt | line`
do
wget ${FTPURL}/${FOLDER}/[filemask]
done << ${SERVERNAME}/folders.txt

now the problem is that $FOLDER contains the trailing \n and that is
screwing up my calls to wget. How do I get rid of the '\n'?



Relevant Pages

  • Re: IIS 4.0 DOS attack?
    ... Subject: IIS 4.0 DOS attack? ... patch distribution script we use (exploded hotfixes applied through ... a lot of our servers were fine -- we just ...
    (Focus-Microsoft)
  • Re: Microsoft Security Advisory MS 03-007
    ... > You say "IIS servers are actively being compromised already, ... -- permissions are checked on httpext.dll to see if Anonymous request using ... CONFIGURATIONS OF THE IIS LOCKDOWN TOOL DO LEAVE WEBDAV ...
    (Focus-Microsoft)
  • RE: Microsoft Security Advisory MS 03-007
    ... announcement covers IIS 5.1 but not IIS 6, ... > You say "IIS servers are actively being compromised already, ... -- permissions are checked on httpext.dll to see if Anonymous request ... CONFIGURATIONS OF THE IIS LOCKDOWN TOOL DO LEAVE WEBDAV ...
    (Bugtraq)
  • Re: Microsoft Security Advisory MS 03-007
    ... announcement covers IIS 5.1 but not IIS 6, ... > You say "IIS servers are actively being compromised already, ... -- permissions are checked on httpext.dll to see if Anonymous request ... CONFIGURATIONS OF THE IIS LOCKDOWN TOOL DO LEAVE WEBDAV ...
    (Bugtraq)
  • RE: Microsoft Security Advisory MS 03-007
    ... announcement covers IIS 5.1 but not IIS 6, ... > You say "IIS servers are actively being compromised already, ... through, and if it carried the exploit, compromise could occur. ... CONFIGURATIONS OF THE IIS LOCKDOWN TOOL DO LEAVE WEBDAV ...
    (Focus-Microsoft)