Professional Web Applications Themes

one question - Linux / Unix Administration

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....

  1. #1

    Default one question

    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.

    yezi Guest

  2. #2

    Default Re: one question

    On 2006-02-17, yezi wrote: 

    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
    Chris Guest

  3. #3

    Default Re: one question

    Thanks , it works.

    yezi Guest

  4. #4

    Default Re: one question

    On 17 Feb 2006 14:11:24 -0800, yezi <com> wrote: 

    That's great, but when you reply to something, please include some
    context so people know what or who you're answering.

    Dave Guest

  5. #5

    Default Re: one question

    On 17 Feb 2006 14:11:24 -0800, yezi <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?

    yezi Guest

  6. #6

    Default Re: one question

    In article <googlegroups.com>,
    "yezi" <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?[/ref]

    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, 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 ***
    Barry Guest

  7. #7

    Default Re: one question

    yezi wrote: 

    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
    Logan Guest

  8. #8

    Default Re: one question

    Thanks for your advice, Now I know how it works.
    Barry Margolin wrote:
     

    yezi Guest

  9. #9

    Default Re: one question

    That works , thanks

    yezi Guest

  10. #10

    Default Re: one question

    On 2006-02-20, yezi wrote: 

    What does? Did you read the link you were given?

    <http://cfaj.freeshell.org/google>


    See also <http://www.caliburn.nl/topposting.html>.

    --
    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
    Chris Guest

  11. #11

    Default Re: one question

    On Mon, 20 Feb 2006 14:45:30 -0500, Chris F.A. Johnson <com> wrote: 
    >
    > What does? Did you read the link you were given?
    > <http://cfaj.freeshell.org/google>
    > See also <http://www.caliburn.nl/topposting.html>.[/ref]

    Any bets on if it'll work?

    Dave Guest

  12. #12

    Default Re: one question

    Dave Hinz wrote: 
    > [/ref]

    >
    > Any bets on if it'll work?[/ref]

    Ten quatloos the newcomers will have to be destroyed!

    Doug Guest

  13. #13

    Default Re: one question

    yezi <com> wrote: 
     [/ref]

    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
    Jeremiah Guest

  14. #14

    Default Re: one question

    On Tue, 28 Feb 2006 17:01:12 +0000 (UTC), Jeremiah DeWitt Weiner <com> wrote: 
    > [/ref]
    >
    > Except that response goes BELOW the text you quote.[/ref]

    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.


    Dave Guest

Similar Threads

  1. Newbie Question: Biz Card Template Question
    By Thomas_Porter@adobeforums.com in forum Adobe Indesign Windows
    Replies: 4
    Last Post: May 30th, 08:08 AM
  2. Replies: 9
    Last Post: April 27th, 04:44 AM
  3. Pen Tool Use Question. (Embarrassingly Newbie Question)
    By Bozo Schmozo in forum Macromedia Flash
    Replies: 0
    Last Post: November 12th, 10:00 PM
  4. regexp question + html::pr question on the side
    By boris in forum PERL Miscellaneous
    Replies: 4
    Last Post: September 27th, 02:24 AM
  5. newB question: related tables question
    By Blue man in forum Microsoft SQL / MS SQL Server
    Replies: 1
    Last Post: June 30th, 04:13 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139