#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    1
    Rep Power
    0

    Adding words on a copied file


    Is anyone here aware of a way I can add additional characters to a file that's being copied from a variable in shell script?

    Something along the lines of...

    COPY=`cp /pathname/$VARIABLE /pathname/$VARIABLE + "A"`
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2006
    Posts
    2,447
    Rep Power
    1751
    You want to add something to the end of the filename when you do the copy?

    Not tested, but should work.
    Code:
    COPY=${cp /pathname/$VARIABLE /pathname/${VARIABLE}A}
    The moon on the one hand, the dawn on the other:
    The moon is my sister, the dawn is my brother.
    The moon on my left and the dawn on my right.
    My brother, good morning: my sister, good night.
    -- Hilaire Belloc

IMN logo majestic logo threadwatch logo seochat tools logo