[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: awk or sed
From: |
Andres Perera |
Subject: |
Re: awk or sed |
Date: |
Tue, 5 Apr 2011 23:16:25 -0430 |
On Tue, Apr 5, 2011 at 10:39 PM, ali hagigat <hagigatali@gmail.com> wrote:
> I have a variable like this:
> var1=Makefile .xcompile /root/build/.config src/arch/i386/Makefile.inc
> means some words separated by spaces. I want to print each word on a
> separate line. I think I have to use "awk" or "sed" string processing
> tools. I wonder if anybody have experience with them or any other
> means to do it.
>
echo "$var" | m4 | perl -pe 's,\s+,\n,g'
>
>