All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Adrian C." <office@snobu.org>
To: zyserman@fcaglp.unlp.edu.ar
Cc: linux-admin@vger.kernel.org
Subject: Re: need help with a bash script
Date: Tue, 19 Sep 2006 22:44:59 +0300	[thread overview]
Message-ID: <451048BB.20204@snobu.org> (raw)
In-Reply-To: <45104173.9080209@fcaglp.unlp.edu.ar>

Fabio Zyserman wrote:
> What I want to do is to create a new file, with one line from each of the
> data files (say, line beginning with 0.01e00), adding to each line in
> the new file the number appearing in the name of the corresponding data
> file.
> That is, the new file will contain one more column than the original
> ones; the new
> file would be
> 0.01e00 .... .... .... 1.2
> 0.01e00 .... .... .... 1.3
> 0.01e00 .... .... .... 1.4

rm -f newfile
for i in `ls data-*`
do
ls $i
printf `cat "$i" | grep -i "0.01e00"`  >> newfile
printf ".........." >> newfile
printf `basename $i | cut -d = -f 3` >> newfile
printf "\n" >> newfile
done


well.. you get the idea.

--Adrian.

  reply	other threads:[~2006-09-19 19:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-19 19:13 need help with a bash script Fabio Zyserman
2006-09-19 19:44 ` Adrian C. [this message]
2006-09-19 19:53 ` Brett Zimmerman
  -- strict thread matches above, loose matches on Subject: below --
2006-09-20 14:04 Fabio Zyserman
     [not found] ` <430c159a0609202108n2390802ar86e91c3fdf7637bd@mail.gmail.com>
2006-09-21  4:10   ` Atishay Kumar
2006-09-19 19:08 Fabio Zyserman
2006-09-19 19:53 ` Adam Bowen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=451048BB.20204@snobu.org \
    --to=office@snobu.org \
    --cc=linux-admin@vger.kernel.org \
    --cc=zyserman@fcaglp.unlp.edu.ar \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.