So there is probably some mistakes in those lines. InsertImages.sh "/path/to/the/template.fodp" "/path/to/the/document" "image1.png" "image2.png" "image3.png" ] & sed "$2/document.fodp" "s/img3.png/$5/" || exit 1 # overwrite the name of the third image ] & sed "$2/document.fodp" "s/img2.png/$4/" || exit 1 # overwrite the name of the second image ] & sed "$2/document.fodp" "s/img1.png/$3/" || exit 1 # overwrite the name of the first image ![]() ] & cp "$1" "$2/document.fodp" || exit 1 # checks if the template exists and copy it ![]() Img3="$5" # will contains the name of the third image in myDir Img2="$4" # will contains the name of the second image in myDir Img1="$3" # will contains the name of the first image in myDir MyDir="$2" # will contains '/path/to/the/document' Let us write a script insertImages.sh myTpl="$1" # will contains '/path/to/the/template.fodp' the images to be imported are in the same directory /path/to/the/document where will be the final document. ![]()
0 Comments
Leave a Reply. |