David,
That works too. Unfortunately the subject: line is incomplete because I must
strip out anything in columns 73-80 (if there's anything there), then the
trailing blanks. I guess that:
sed 's/\(.\{0,72\}\).*/\1/' <infile | sed 's/\ *//' >outfile
would work too. What I'm actually doing is something like:
ftp all member of the PDS into a clean subdirectory
for i in *;do mv $i $(echo $i|tr 'A-Z' 'a-z');done
# translate names to lower case for easy of manipulation
for i in *;do ../nonum <$i >$i.tmp;done
# strip line numbers and trailing blanks (this is what I really needed help
with)
for i in *.tmp;do rm $(echo $i | sed 's/.tmp$//');done
# remove original, unmodified files
I don't actually use .tmp as the suffix, I use something like .jcl or .asm
or .cobol in the "nonum" step.
Now that I have your attention (grin) what I'd like is something like:
download -host MYMVS -user MYUSER -password MYPASS file
'MYUSER.PDF.CNTL(member)'
$EDITOR file
upload -host MYMVS -user MYUSER -password MYPASS file
'MYUSER.PDS.CNTL(member)'
What I'm really trying to do is to just offload whatever simple stuff that I
can from the MVS system. What I would eventually like to do is create a
script which would download the file that I'm interested in editing, invoke
my $EDITOR on it, then upload the file back to the mainframe if it were
modified. What would be even better would be something that would look at
the directory of the PDS that I mention, allow me to select the member,
download it, edit it, then upload that member only if I actually changed it.
Once I have this, I would then want Linux/SDSF so that I could have a full
screen SDSF like environment. Really weird ideas percolating through my
head. I'm trying to actually figure out how to get some sort of work out of
this IFL running Linux.
--
John McKown
Senior Systems Programmer
UICI Insurance Center
Applications & Solutions Team
+1.817.255.3225
This message (including any attachments) contains confidential information
intended for a specific individual and purpose, and its' content is
protected by law. If you are not the intended recipient, you should delete
this message and are hereby notified that any disclosure, copying, or
distribution of this transmission, or taking any action based on it, is
strictly prohibited.
> -----Original Message-----
> From: David Andrews [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 28, 2003 10:20 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Stripping trailing blanks?
>
>
> On Mon, 2003-07-28 at 10:27, McKown, John wrote:
> > Is there a simple way to strip blanks from all the lines in a file?
>
> You might also try:
>
> sed 's/\ *$//' <infile >outfile
>
> --
> David Andrews
> A. Duda and Sons, Inc.
> [EMAIL PROTECTED]
>