Is this possible? sed? awk?

Is this possible? sed? awk?

Post by jest » Thu, 09 Mar 1995 22:33:08




[...]
>So, I want to convert this type of list

>=====

[...]


[...]

        You want awk :
$ awk '{printf("%s \\\n",$1);}' addresses_file_name
--

 __________________________              `o O'

\ \   Ader239, ENAC, 7 av E.Belin, 31055 TOULOUSE (FRANCE)\

 
 
 

Is this possible? sed? awk?

Post by Gedaliah Friedenbe » Thu, 09 Mar 1995 16:47:58


I have a list of e-mail addresses and their associated usernames, and
I want to send a file to every one of them.  In order to do this, I
need to be able to use the foreach command.  To use foreach, I need to
convert the current list (see below) into a list which includes one
address per line followed by a space and a \ symbol.

So, I want to convert this type of list

=====




=====

and make it look like this:

=====




=====

I would REALLY appreciate some help.  I do not know sed or awk, but I
am sure that this cannot be a very hard thing to do.

Thanks

Gedaliah


 
 
 

Is this possible? sed? awk?

Post by David W. Tamk » Sat, 11 Mar 1995 08:27:01



| So, I want to convert this type of list
|
| =====




| =====
|
| and make it look like this:
|
| =====




| =====

sed 's/[        ].*/ \\/' oldfile > newfile

The brackets enclose a space and a tab.

 
 
 

Is this possible? sed? awk?

Post by Gail Long [Contracto » Sat, 11 Mar 1995 12:16:22




>| So, I want to convert this type of list
>|
>| =====




>| =====
>|
>| and make it look like this:
>|
>| =====




>| =====

>sed 's/[    ].*/ \\/' oldfile > newfile

>The brackets enclose a space and a tab.

Or awk!

awk ' {print $1"\\"} ' oldfile > newfile

This allow you a little more flexibility later.
---
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
             |                         ;

             |                         ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;