|
Home > Archive > Unix administration > March 2006 > one question
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
|
| Hi:
I have one question regarding to the format of output.
I have series file which are like :
100.0.0.rec.RD
100.0.1.rec.RD
200.1.0.rec.RD
....
The content of each file is one number like "0.999"for 100.0.0.rec.RD;
0.883 for 200.1.0.rec.RD
What I want to have on screen is sth like :
100.0.0.rec.RD 0.999
200.1.0.rec.RD 0.883
IS any kind of command can relize the function?
Thanks for any comments.
| |
| Chris F.A. Johnson 2006-02-17, 10:40 pm |
| On 2006-02-17, yezi wrote:
> Hi:
>
> I have one question regarding to the format of output.
> I have series file which are like :
>
> 100.0.0.rec.RD
> 100.0.1.rec.RD
> 200.1.0.rec.RD
> ...
>
> The content of each file is one number like "0.999"for 100.0.0.rec.RD;
> 0.883 for 200.1.0.rec.RD
>
> What I want to have on screen is sth like :
>
> 100.0.0.rec.RD 0.999
> 200.1.0.rec.RD 0.883
>
> IS any kind of command can relize the function?
for file in *.RD
do
read n < "$file"
printf "%s %s\n" "$file" "$n"
done
--
Chris F.A. Johnson, author | <http://cfaj.freeshell.org>
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence
| |
|
|
| Dave Hinz 2006-02-17, 10:40 pm |
| On 17 Feb 2006 14:11:24 -0800, yezi <ye_line@hotmail.com> wrote:
> Thanks , it works.
That's great, but when you reply to something, please include some
context so people know what or who you're answering.
| |
|
| On 17 Feb 2006 14:11:24 -0800, yezi <ye_l...@hotmail.com> wrote:
> Thanks , it works.
That's great, but when you reply to something, please include some
context so people know what or who you're answering.
Sure. it is that way, right?
| |
| Barry Margolin 2006-02-17, 10:40 pm |
| In article <1140218365.369972.172280@f14g2000cwb.googlegroups.com>,
"yezi" <ye_line@hotmail.com> wrote:
> On 17 Feb 2006 14:11:24 -0800, yezi <ye_l...@hotmail.com> wrote:
>
>
> That's great, but when you reply to something, please include some
> context so people know what or who you're answering.
>
> Sure. it is that way, right?
Also, you should distinguish the context you're quoting from your
response, e.g. with prefixes as above.
Since you use Google Groups, please see
<http://cfaj.freeshell.org/google/>
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
| |
| Logan Shaw 2006-02-20, 2:48 am |
| yezi wrote:
> I have one question regarding to the format of output.
> I have series file which are like :
>
> 100.0.0.rec.RD
> 100.0.1.rec.RD
> 200.1.0.rec.RD
> ...
>
> The content of each file is one number like "0.999"for 100.0.0.rec.RD;
> 0.883 for 200.1.0.rec.RD
>
> What I want to have on screen is sth like :
>
> 100.0.0.rec.RD 0.999
> 200.1.0.rec.RD 0.883
If you don't mind having colons instead of spaces, it's really easy:
grep . *RD
Note that this will only work if there is more than one *RD file,
but it's very quick and easy to type.
- Logan
| |
|
| Thanks for your advice, Now I know how it works.
Barry Margolin wrote:
> Also, you should distinguish the context you're quoting from your
> response, e.g. with prefixes as above.
>
> Since you use Google Groups, please see
> <http://cfaj.freeshell.org/google/>
>
> --
> Barry Margolin, barmar@alum.mit.edu
> Arlington, MA
> *** PLEASE post questions in newsgroups, not directly to me ***
> *** PLEASE don't copy me on replies, I'll read them in the group ***
| |
|
|
|
|
|
|
| Doug Freyburger 2006-02-20, 5:54 pm |
| Dave Hinz wrote:
> Chris F.A. Johnson wrote:
>
>
>
> Any bets on if it'll work?
Ten quatloos the newcomers will have to be destroyed!
| |
| Jeremiah DeWitt Weiner 2006-03-03, 6:43 pm |
| yezi <ye_line@hotmail.com> wrote:
> Thanks for your advice, Now I know how it works.
> Barry Margolin wrote:
[vbcol=seagreen]
Except that response goes BELOW the text you quote.
--
Oh to have a lodge in some vast wilderness. Where rumors of oppression
and deceit, of unsuccessful and successful wars may never reach me
anymore.
-- William Cowper
| |
| Dave Hinz 2006-03-03, 6:43 pm |
| On Tue, 28 Feb 2006 17:01:12 +0000 (UTC), Jeremiah DeWitt Weiner <jdw@panix.com> wrote:
> yezi <ye_line@hotmail.com> wrote:
>
>
> Except that response goes BELOW the text you quote.
Well, only if you want your posts to be read and responded to.
Top-posting is fine if your goal is to be ignored. It all depends on
the purpose of posting, I guess.
|
|
|
|
|