1. edit /etc/security/limits.conf, add the bellowing line
* soft core unlimited2. logout and login
$ ulimit -c $ ulimit -a
* soft core unlimited2. logout and login
$ ulimit -c $ ulimit -a
<!-- highlighting code -->
<link href='http://alexgorbatchev.com/pub/sh/current/styles/shCore.css' rel='stylesheet' type='text/css'/>
<link href='http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css' rel='stylesheet' type='text/css'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js' type='text/javascript'/>
<!-- add brushes here -->
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushBash.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushSql.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCpp.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPython.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPerl.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJava.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPlain.js' type='text/javascript'/>
<script type='text/javascript'>
SyntaxHighlighter.config.bloggerMode = true;
SyntaxHighlighter.all();
</script>
然后上传模板,保存 ...#include <stdio.h>
int main(int argc, char* argv[])
{
printf("test only ...\n");
return 0;
}
测试bash程序
#/bin/bash echo "test only ..."
#include <stdio.h>
#include <string.h>
char *shift_r(const char *src, const int n, char *dst)
{
int i, len;
if (src == NULL || (len = strlen(src)) == 0)
return (dst = NULL);
for (i = 0; i < len; i++)
dst[(i+n)%len] = src[i];
dst[i] = '\0';
return dst;
}
int main(int argc, char *argv[])
{
const char *src = "abcdef";
char dst[80];
const int n = 2;
printf("%s\n%s\n", src, shift_r(src, n, dst));
return 0;
}
好吧, 这个也算 ... 口头描述这个真没劲 ...
#!/bin/bash
echo "testing for ..."
for ((i=0; i < 10; i++))
do
echo $i
done
echo "testing while ..."
i=0
while [ $i -lt 10 ]
do
echo $i
i=$((i+1))
done
label linux
kernel vmlinuz
append initrd=initrd.gz ramdisk_size=12000 root=/dev/rd/0 init=/linuxrc rw
default linux
prompt 1
timeout 0