Help:Script Samples: Difference between revisions

Content deleted Content added
Line 123:
 
== Indenting <code>&lt;pre&gt;</code> tags ==
{{Note|There is something intermittent about this working which I haven't figured out yet. It doesn't render correctly below but it does no other pages}}
 
 
{| class="wikitable"
| {{rh}} | Code
Line 141 ⟶ 144:
# two
|}
 
 
{{Tip|Because syntaxhighlight wraps everything in a <code><div></code> it works to indent with <code>;</code> and <code>:</code> as below}}
 
<pre>
; Something to notice in bash example below
:<syntaxhighlight lang=bash inline>
#!/bin/bash
fileCount=800000
b=0
while [ $b -le $fileCount ]
do
echo B = $b
dd if=/dev/urandom of=/mnt/nfs/file$b.txt bs=2k count=1
((b++))
done
</syntaxhighlight>
 
 
; Something to notice in bash example below
:<syntaxhighlight lang=bash>
#!/bin/bash
fileCount=800000
b=0
while [ $b -le $fileCount ]
do
echo B = $b
dd if=/dev/urandom of=/mnt/nfs/file$b.txt bs=2k count=1
((b++))
done
</syntaxhighlight>