Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- textfile="file.txt"
- htmlfile="file.html"
- rm "$htmlfile"
- x=0
- cat "$textfile" |sed 's/=/\n=\n/g'|while read line
- do
- if [ "$line" = "=" ]
- then
- if [ "$x" = "0" ]
- then
- echo "<h1>" >> "$htmlfile"
- x=1
- else
- echo "</h1>" >> "$htmlfile"
- x=0
- fi
- else
- echo "$line" >> "$htmlfile"
- fi
- done
Add Comment
Please, Sign In to add comment