more code

Highlighting some piece of bash code

!/bin/sh

SAVEIFS=$IFS
IFS=$(echo "\n\b")
for f in *
do
if [ ! -d "/media/usbdisk/kidz/$f" ]
then
echo $(du -sh "$f")
fi
done
IFS=$SAVEIFS

plsql??

[highlight]CREATE OR REPLACE TYPE jka_nt_varchar2_100
AS TABLE OF VARCHAR2(100)[/highlight]

[highlight]declare
l_values jka_nt_varchar2_100 := jka_nt_varchar2_100();
begin
l_values.extend;
l_values(l_values.last):=’abcd’;
end;[/highlight]

shortcode

Shortcode:

[highlight class=bash]#!/bin/bash

###### CONFIG
ACCEPTED_HOSTS=”/root/.hag_accepted.conf”
BE_VERBOSE=false

if [ “$UID” -ne 0 ]
then
echo “Superuser rights required”
exit 2
fi

genApacheConf(){
echo -e “# Host ${HOME_DIR}$1/$2 :”
}
[/highlight]

Post met code

In deze post wordt een blok met code besproken. Stukje eenvoudige bash:
[highlight]$ sudo useradd -d /home/nieuweuser -m nieuweuser[/highlight]

[highlight class=bash]$ls -ltr[/highlight]