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/bash | |
DIR="/home/user/shell/link" | |
WGET=`wget -q http://sample/sample.html -O $DIR/link.html` | |
CHARSET=`nkf -w8 $DIR/link.html > $DIR/link.txt` | |
URLHTML=`cat link.txt | grep HREF |grep -v font |sed 's/<A HREF\=\"//g' |sed 's/\" TARGET\=\"\_blank\">/ /g' | sed 's/<\/A><br>//g'| sed 's/<\/A><BR>//g' |awk '{print $1}' |grep http ` | |
for URL in $URLHTML;do | |
wget -q -O /dev/null $URL | |
FLAG=`echo $?` |
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/bash | |
FILE="/home/user/shell/deadscript/ping_result.txt" | |
PACKET_LOSS_FILE="/home/user/shell/deadscript/ping_result_packet_loss.txt" | |
PACKET_TIME_FILE="/home/user/shell/deadscript/ping_result_time.txt" | |
PING_RESULT=`ping -c $1 $2 > $FILE` | |
RESULT_LOSS=`cat $FILE | tail -2 | head -1 | awk '{print $6}' | sed 's/\%//g' > $PACKET_LOSS_FILE` | |
RESULT_TIME=`cat $FILE | tail -2 | head -1 | awk '{print $10}' | sed 's/ms//g' > $PACKET_TIME_FILE` | |
LOSS=`cat $PACKET_LOSS_FILE` | |
TIME=`cat $PACKET_TIME_FILE` |
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/bash | |
DIR=$1 | |
BACKUPDIR=$2 | |
DATE=`date +"%Y%m%d%H%M"` | |
[ -e $DIR ] || { echo "not found $DIR" ; exit 1 ; } | |
[ ! -e $BACKUPDIR/$DATE.tar.gz ] || { echo "$DATE.tar.gz is existence" ; exit 1 ; } |
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/bash | |
#ファイル名のtestという文字列をhogeに変更するスクリプト | |
NAME=$1 | |
NAME_AFTER=$2 | |
shift 2 | |
for FILE in $@;do | |
[[ -e "$FILE" ]] || { echo "$FILE file didn't exist" ; exit 1 ; } |
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/bash | |
TIMESTAMP=`date +"%Y%m%d%H%M"` | |
COUNT=1 | |
DIR=/home/username/test | |
cd $DIR | |
for file in * | |
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
max_connections = 500 | |
bulk_insert_buffer_size = 8M | |
nice=5 | |
query_cache_size = 16M | |
query_cache_limit = 1M | |
thread_cache_size = 1 | |
innodb_buffer_pool_size = 512M | |
innodb_additional_mem_pool_size = 4M | |
innodb_log_buffer_size = 8M | |
innodb_log_file_size = 64M |
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
LoadModule passenger_module /usr/local/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/passenger-3.0.13/ext/apache2/mod_passenger.so | |
PassengerRoot /usr/local/ruby-enterprise-1.8.7/lib/ruby/gems/1.8/gems/passenger-3.0.13 | |
PassengerRuby /usr/local/ruby-enterprise-1.8.7/bin/ruby | |
Header always unset "X-Powered-By" | |
Header always unset "X-Rack-Cache" | |
Header always unset "X-Content-Digest" | |
Header always unset "X-Runtime" | |
PassengerMaxPoolSize 40 |
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
import java.io.*; | |
public class Season { | |
public static void main(String[] args) { | |
BufferedReader reader = new BufferedReader(new InputStreamReader( | |
System.in)); | |
String winter = "冬"; | |
String spring = "春"; | |
String summer = "夏"; |
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
public class MainStudents{ | |
public static void main(String[] args) { | |
Students onuki = new Students(); | |
int onukiSum = onuki.sum(82,70); | |
System.out.println("小貫の合計点は" + onukiSum); | |
Students suzuki = new Students(); | |
int suzukiSum = suzuki.sum(85,74); | |
System.out.println("鈴木の合計点は" + suzukiSum); | |
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
public class Triangle{ | |
public static void main(String[] args) { | |
for (int i = 0; i < args.length; i++){ | |
for (int j = 0; j < i + 1; j++) { | |
System.out.print("*"); | |
} | |
System.out.println(""); | |
} | |
} | |
} |
NewerOlder