Created
December 20, 2011 09:44
-
-
Save dietmarw/1500980 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Script to create a "Modelica" ready version of the Grammar.html | |
echo 'readFile("Grammar.html");' > /tmp/a.mos | |
omc $* /tmp/a.mos > Grammar.mo | |
# remove first line | |
sed '1d;3d' -i Grammar.mo | |
sed -e s#h1\>#h4\>#g -i Grammar.mo | |
sed -e s#h2\>#h5\>#g -i Grammar.mo | |
rm /tmp/a.mos | |
Well the problem is that:
$ sed 1,3d ...
will remove lines 1 through to 3 and not 1 and 3. You got a tip on how to solve that?
OK the last change solved it. ;
was the key
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can combine the sed commands:
In fact, you can even do