[...]
>=====
[...]
You want awk :
$ awk '{printf("%s \\\n",$1);}' addresses_file_name
--
__________________________ `o O'
\ \ Ader239, ENAC, 7 av E.Belin, 31055 TOULOUSE (FRANCE)\
>=====
[...]
You want awk :
$ awk '{printf("%s \\\n",$1);}' addresses_file_name
--
__________________________ `o O'
\ \ Ader239, ENAC, 7 av E.Belin, 31055 TOULOUSE (FRANCE)\
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
| 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.
>| 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.
awk ' {print $1"\\"} ' oldfile > newfile
This allow you a little more flexibility later.
---
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
| ;
| ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;