My b2evolution Version: Not Entered
This isn't the first time i have got jacked up by this. Our blog we like to reference alot of code and tech stuff but too many errors posting. Is there a quick fix?
THE ERROR:
Invalid post, please correct these errors:
Parser error: XML_ERR_NAME_REQUIRED near linecount="$(($linec
THE TEXT IN POST:
The Code
#!/bin/sh
# numberlines - A simple alternative to cat -n, etc.
for filename
do
linecount="1"
while read line
do
echo "${linecount}: $line"
linecount="$(($linecount + 1))"
done < $filename
done
exit 0
Running the Script
You can feed as many filenames as you want to this script, but you can't feed it input via a pipe, though that wouldn't be too hard to fix, if needed.
The Results
$ numberlines text.snippet.txt
1: Perhaps one of the most valuable uses of shell scripts is to fix
2: your particular flavor of Unix and make it more like other flavors,
3: to bring your commands into conformance or to increase consistency
4: across different systems. The outsider view of Unix suggests a
5: nice, uniform command-line experience, helped along by the existence
6: of and compliance with the POSIX standards for Unix. But anyone who's
7: ever touched more than one computer knows how much they can vary
8: within these broad parameters.
Depending on your evo version you might be able to use [url=http://b2evo.astonishme.co.uk/index.php/2005/12/30/display-code-plugin]this plugin[/url], from 1.10.x it's part of the core so you may already have it.
¥