Merging a one string to various others
I have a list of files like this
00023.jpg 00067.jpg 00012.jpg 00098.jpg on a file I need to add the http://images.example.org/ string before each of them I am doing this in bash BTW Any clue? Thanks in advance |
Code:
for file in [0-9]*.jpg ; do |
sed -i 's#^#http://images.example.org/#' file
|
Thanks Mr.C!
However my list of file doesn't have an order, but I have the complete list on a file. I tried for file in īcat filelistī; do echo "$url$file" done Thanks! |
If you have a list of files in a file, use jschiwal's better solution. I misread your question. If you have files in a directory, then what I gave will work. You did a nice job adapting my mis-answer to your situation though!
|
All times are GMT -5. The time now is 06:15 PM. |