bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: awk or sed


From: Chris F.A. Johnson
Subject: Re: awk or sed
Date: Tue, 5 Apr 2011 23:17:29 -0400 (EDT)
User-agent: Alpine 2.00 (LMD 1167 2008-08-23)

On Wed, 6 Apr 2011, ali hagigat 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.

printf "%s\n" $var1

  (You might want to precede that with 'set -f'.)

--
   Chris F.A. Johnson, <http://cfajohnson.com/>
   Author:
   Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress)
   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]