OSの授業の予習会でやった内容を載せていきます。主に昨年の授業内容を参照しているので今年度の内容とは内容が異なる可能性があります。
OSの授業ページ
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
#!/bin/sh | |
#引数チェック | |
if [ $# -eq 3 ] ; then | |
filename=$1 | |
pagetitile=$2 | |
reportnumber=$3 | |
else | |
echo "Usage: prompt > $0 filename title reportnumber" |
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 perl | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
use utf8; | |
binmode STDOUT,":utf8"; | |
my $alice = { | |
name => 'Alice', |
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
#OSmkdir{{{ | |
osmkdir() | |
{ | |
if [ $# -eq 0 ]; then | |
echo "missing arguments " 1>&2 | |
exit 1 | |
fi | |
#ここのSSHを変更してください | |
SSH=ssh://yomitan//home/hg/y15/e155730/OS/ |
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
### Keybase proof | |
I hereby claim: | |
* I am anatofuz on github. | |
* I am anatofuz (https://keybase.io/anatofuz) on keybase. | |
* I have a public key ASCUFSGTiUxBUZFHjP1aoEdppUbRXxdOlEtW9jc3wFwPlwo | |
To claim this, I am signing this object: |
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 perl | |
sub hoge { | |
print $foo{"hoge"}; | |
} | |
$foo{"hoge"} = "inu"; | |
do hoge(); |
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
#define __environment _CbC_environment | |
#define __return _CbC_return | |
#include "stdio.h" | |
#include "string.h" | |
#include <stdlib.h> | |
__code fizzbuzz(int,int,__code(),void*); | |
__code say2(int,int,char*,__code(),void*); | |
__code fizz(int,int,__code(),void*); |
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
extern int printf(const char *,...); | |
int *f() { | |
int i = 6; | |
printf("in f %d\n", i); | |
printf("in f %p\n", &i); | |
return &i; | |
} | |
int *g() { |
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
use strict; | |
use warnings; | |
while (my $line = <DATA>){ | |
if ($line =~ /(<h2(.*?)>(.*?)<\/h2>)|(<p pno=(.*?)>(.*?)<\/p>)/){ | |
print "$1\n"; | |
} | |
} | |
__DATA__ |
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
FROM anatofuz/perl-1.0:latest | |
COPY ./perl_1.pl / | |
ENTRYPOINT ["/usr/local/bin/perl","/perl_1.pl"] |
OlderNewer