Skip to content

Instantly share code, notes, and snippets.

引数として渡されたプロセス名が起していれば
プロセスを強制終了する
process.sh
------------------------------
#!/bin/sh
#プロセス名を引数として受け取る
PROCESS_NAME=$0
expect_sample.sh
--------------------------------------------------------------
#!/bin/sh
COMMAND="ls -la"
expect -c"
set timeout 5
spawn env LANG=C /usr/bin/ssh UserName@host
expect \"\\\% \"
#!/bin/sh
#概要:
# ローカルのmongodbサーバに対してfindコマンドを実行する
# 対象のコレクション名は第一引数、検索条件は第二引数で指定する
# 第二引数がない場合は検索条件なしで第一引数のコレクションに対し
# findコマンドを実行する
#
#引数:
# 第一引数-コレクション名
@thorie33
thorie33 / MainWindow.xaml.cs
Last active October 15, 2017 15:12
C#からC++のDLLを呼び出す際の最低限の内容(文字列のマーシャリング含む)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
とりあえずWebサイトの指定があったので...
#include <fstream>
#include <string>
#include <vector>
#include <iostream>
#include <sstream>
using namespace std;