>> , how to use ?
I have a file:
$ cat new face.jpg owl-face.jpg man-face.jpg normally, if we want to append a character or a file: $ echo "anything.jpg" >> new $ cat new face.jpg owl-face.jpg man-face.jpg anything my question is how to append "anything" any where I want ; face.jpg anything owl-face.jpg man-face.jpg anything or face.jpg anything owl-face.jpg man-face.jpg anything thanks for helping, |
i believe you'd use sed for this, but you'd have to specify what you mean by "anywhere"... like, perhaps you wanna insert the text after a certain line number, or maybe after a certain text pattern, etc...
http://www.google.com/linux?hl=en&lr...=Google+Search just my two cents... |
Well, I know how to do that with sed. But I wonder if there is any way to do it with bash?
Quote:
|
My problem is I have a file "new"
$ cat new face.jpg owl-face.jpg man-face.jpg How I make this file become a html file ? <html> <body> <table> <tr><td><img src=face.jpg></td> <tr><td><img src=owl-face.jpg></td> <tr><td><img src=man-face.jpg></td> </table> </body> </html> bash only, thanks, |
Quote:
you can't do it "just with bash" as bash is just a shell and needs access to commands such as cat, grep, gawk, sed, etc. to be able to actually do stuff like this... |
Quote:
for example, let's say you make face.jpg equal to $jpg-001, then the line "<tr><td><img src=face.jpg></td>" could be printed like: Code:
echo "<tr><td><img src=$jpg-001></td>" |
All times are GMT -5. The time now is 08:09 AM. |