Re: for loop in bash script over two variables
From: Barry Margolin (barry.margolin_at_level3.com)
Date: 10/23/03
- Next message: Chris F.A. Johnson: "Re: How to change a environment variable of a shell"
- Previous message: Andreas Kahari: "Re: for loop in bash script over two variables"
- In reply to: Jeevan: "for loop in bash script over two variables"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 23 Oct 2003 21:45:20 GMT
In article <a6a2b8c.0310231341.5ad96bd8@posting.google.com>,
Jeevan <kjeevan_kumar@yahoo.com> wrote:
>Hi,
>
>I have two files, one (f1) which contains the list of files and other
>(f2) which contains list of their sizes respectively. I am trying to
>write a bash script which prints the name of the file and then its
>size. I was trying to use the following code but it is not working.
>
>files=`(cat f1)`
>sizes=`(cat f2)`
>for file in $files
>do
paste f1 f2
-- Barry Margolin, barry.margolin@level3.com Level(3), Woburn, MA *** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups. Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
- Next message: Chris F.A. Johnson: "Re: How to change a environment variable of a shell"
- Previous message: Andreas Kahari: "Re: for loop in bash script over two variables"
- In reply to: Jeevan: "for loop in bash script over two variables"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|