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

    Join Date
    Mar 2013
    Rep Power

    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 Frequenter (2500 - 2999 posts)

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

    Not tested, but should work.
    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