Results 1 to 3 of 3

Thread: Unix Script

  1. #1
    Join Date
    Mar 2004
    Posts
    1

    Post Unanswered: Unix Script

    Please help

    Read a file asuume a.lst with a value 12345
    How can I make an external unix file with value 123456 with any extensio.

    Thank you
    KM

  2. #2
    Join Date
    Jan 2004
    Location
    Bordeaux, France
    Posts
    320
    I am not sure to understand what you want to do...
    Something like this ?

    Code:
    read value < a.lst   # read value 12345 stored in file a.lst
    echo "${value}6" > b.lst  # write 123456 in new file b.lst
    Jean-Pierre.

  3. #3
    Join Date
    Jan 2004
    Location
    Bordeaux, France
    Posts
    320
    [SIZE=1]Originally posted by kmal
    Sorry, I did not eloborate it properly. Here is my problem

    1. I have 3 file a.lst abc.bbb and abc.ccc
    2. a.lst has a vlue 123, i want to read
    3. I want to rename abc.bbb & abc.ccc to 123.bbb & 123.ccc

    Thank you for your help
    Kma

    Code:
    read value < a.lst
    mv abc.bbb $value.bbb
    mv abc.ccc $value.ccc
    Jean-Pierre.

Posting Permissions

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