wripeでバックアップしたtxtファイルの中身からファイル名を変更する

bash script でwripeバックアップファイルの変換処理を書いた 主な内容 bash script Ubuntu 14.04で確認 UTF8,LF変換にnkf のインストールが必要 ファイル変換内容 1行目(wripeタイトル)から、ファイル名決定 ファイル名に使用できる文字列変換 wripeタイトルに日付が入っていた場合の処理をある程度考慮 1行目は削除 UTF8,LF変換 tag 空白4文字変換 起動引数 第一引数:バックアップファイルの保存先 疲れた…. #!/bin/bash DIR_IN=$1 OUT_NAME=out DIR_OUT=$DIR_IN/$OUT_NAME which nkf 1>/dev/null 2>/dev/null RC=$? if [ $RC -ne 0 ]; then echo "nkf not installed!" return fi if [ "" == "$1" ]; then echo "arg1(input directory) is blank!" return fi if [ -d $DIR_IN ]; then # specified directory is exist. if [ -e $DIR_OUT ]; then # out dir is exist....

2014-10-19 ·  2014-10-19 · 2 分 · 421 文字

Ubuntu 14.04 Change LF UTF-8 Under Specified Directory

Install nkf sudo aptitude install nkf usege nkf -wLu --overwrite *.txt # -w: change to UTF8 # -Lu: change to LF # --overwrite: overwrite file! Exclude .git or and so on files, and specified some extension. find . \( -name "i18n" -o -name ".git" -o -name "jquery*.js" -o -name "jquery*.css" \) -prune -o -type f \( -name "*.txt" -o -name "*.js" -o -name "*.css" -o -name "*.html" -o -name "*.php" \) -print -exec nkf -wLu --overwrite {} \;

2014-10-12 ·  2014-10-12 · 1 分 · 78 文字

Ubuntu 14.04 grive install

install sudo add-apt-repository ppa:nilarimogard/webupd8 sudo apt-get update sudo aptitude install grive mkdir -p ~/grive cd ~/grive grive -a grive -a コマンドでURL表示 アクセスし、承認するとキーが表示される terminalへ貼り付け! 同期開始! file sync cd ~/grive grive

2014-10-11 ·  2014-10-11 · 1 分 · 29 文字

Ubuntu 14.04 Theme をnumixへ変更

install sudo apt-add-repository ppa:numix/ppa sudo aptitude update sudo aptitude install numix-gtk-theme #sudo aptitude install numix-icon-theme-utouch sudo aptitude install numix-icon-theme sudo aptitude install numix-wallpaper-saucy # ↓この丸いアイコンがすごくよい。 sudo aptitude install numix-icon-theme-circle theme setting setting from tweak-tool

2014-10-08 ·  2014-10-08 · 1 分 · 34 文字

Debian wheezy に Ubuntu 14.04 クライアントからSSH接続する

[Client] Key generate create pub, private key at ~/.ssh cd ~/.ssh ssh-keygen -t rsa # created under files id_rsa id_rsa.pub upload public key to server. scp id_rsa.pub [server ip address]:~/ [Client] .ssh/config vim ~/.ssh/config Host [server name] HostName [server name or ipaddress] Port 22 User [login user name] IdentityFile ~/.ssh/id_rsa [server] regist pub key login the server. cd ~ cat rsa.pub >> ~/.ssh/authorized_keys [server] sshd settings sudo vim /etc/ssh/sshd_config check the settings...

2014-10-07 ·  2014-10-07 · 1 分 · 78 文字