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
# | |
# awkでHello World | |
# | |
BEGIN{ print "Hello World!" } | |
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
# | |
# CSVから特定の列だけ抜き出す | |
# | |
# | |
BEGIN{ | |
FS = "," # フィールドセパレーターを","へ | |
} | |
{ |
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
# | |
# CSVファイルから TANAKAのものが出現する回数をカウント | |
# 「本」が出てくる回数をカウント | |
# | |
BEGIN{ | |
FS = "," | |
kaisu = 0 # 初期化は必須ではない | |
total = 0 | |
hon = 0 |
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
# | |
# 名前ごとに金額集計 | |
# | |
BEGIN{ | |
FS = "," | |
} | |
{ | |
total[$2] += $4 # 配列の添え字は文字列OK (Perlのハッシュ) |
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
#!/local/bin/python3 | |
# カレントディレクトリのファイル名からブランクを無くしてリネーム | |
# ...Python3 | |
import os | |
import sys | |
import re | |
import shutil | |
def yes_no_input(s): |
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
# | |
# ファイル名からブランクを削除 | |
# | |
def ask_yn msg | |
while true | |
print msg | |
response = STDIN.gets | |
case response.downcase | |
when /y|yes/ |
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
import java.io.UnsupportedEncodingException; | |
public class EBCDICtest { | |
public static void main(String[] args) { | |
byte[] ibm=null; | |
try { | |
String unicode = "T0001 アイウエオ"; | |
ibm = unicode.getBytes("Cp930"); | |
} catch(UnsupportedEncodingException e) { |
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
import csv | |
import sys | |
import os | |
import openpyxl | |
import importlib | |
argvs = sys.argv | |
argc = len(argvs) | |
wb = openpyxl.Workbook() |
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
# | |
# ダンプ形式テキストからモトローラSフォーマット生成 | |
# gawk 専用 | |
# - - - - | |
# HEXダンプファイルフォーマット | |
# アドレス データ2桁x16 | |
# ------- ------------------------- | |
# 0100 01 02 03 04 05 ... 16バイト分 | |
# |
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
const int a0=9; | |
const int a1=10; | |
const int WR=11; | |
const int RD=12; | |
void setup() | |
{ | |
pinMode(0,OUTPUT); | |
pinMode(1,OUTPUT); | |
pinMode(2,OUTPUT); |
OlderNewer