VMD-L Mailing List
From: andrea spitaleri (spitaleri.andrea_at_hsr.it)
Date: Mon Feb 13 2006 - 08:42:49 CST
- Next message: Anna Modzelewska: "Re: tcl-reading files"
- Previous message: Nuno R. L. Ferreira: "Re: tcl-reading files"
- In reply to: Anna Modzelewska: "tcl-reading files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
more file | awk '{print $4}'
or even grep ..
then if you more files just use a loop
andrea
Anna Modzelewska wrote:
> Hello,
>
> I'm writing a tcl script in which I need to read numerical values of
> variable length from a file.
> Is there any simple way to read from files string after string and not
> sign after sign?
>
> To make the question more clear, the lines are:
> "text1 text2: -1.2345 23.5 -234.56731"
> "text154 text2: 5.23 -2.987 -2.531"
> and I would like to read the fourth string from each line (in this
> case: 23.5 and -2.987).
>
> Best Regards
> Anna
>
> ************************************************************************
> Anna Modzelewska, M.Sc. amodzelewska_at_iimcb.gov.pl
> <mailto:amodzelewska_at_iimcb.gov.pl>
> International Institute of Molecular and Cell Biology
> http://www.iimcb.gov.pl/
> Trojdena 4, 02-109 Warsaw, Poland
> phone: +48 22 5970721 fax: +48 22 5970715
> ************************************************************************
>
>
-- ------------------------------- Andrea Spitaleri Dulbecco Telethon Institute c/o DIBIT Scientific Institute Biomolecular NMR, 1B4 Via Olgettina 58 20132 Milano (Italy) -------------------------------
- Next message: Anna Modzelewska: "Re: tcl-reading files"
- Previous message: Nuno R. L. Ferreira: "Re: tcl-reading files"
- In reply to: Anna Modzelewska: "tcl-reading files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]