This file contains hidden or 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
#!/bin/sh | |
dstamp=`date "+%F-%T"` | |
bkupdir=/var/tmp/$0-$dstamp | |
mkdir -p $bkupdir && cd $bkupdir | |
for d in zone block machine device zone_design block_design machine_design | |
do | |
echo -n "backing up $d records..." | |
ocs $d list | grep -v ID | sort | uniq | grep -v "^ *$" | cut -f 3 -d " " | while read f ; do |
This file contains hidden or 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/ruby | |
class Me | |
def leppard ; self.pour("some sugar") ; end | |
def pour(substance) | |
puts "Pour " + substance + " on me" | |
end |
This file contains hidden or 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
class Kid | |
def initialize(name) | |
@name = name | |
@score = 0 | |
end | |
def getapoint | |
@score += 1 | |
end |