タグ

shellに関するCherenkovのブックマーク (24)

  • パイプでフラッシュされる単位を制御するコマンド - Qiita

    Register as a new user and use Qiita more conveniently You get articles that match your needsYou can efficiently read back useful informationYou can use dark themeWhat you can do with signing up

    パイプでフラッシュされる単位を制御するコマンド - Qiita
    Cherenkov
    Cherenkov 2022/06/12
    ストリーム 標準出力 フラッシュ stream flush pipe
  • ちょっと複雑なシェルスクリプトをJavaScriptで書く - lacolaco-engineering

    ちょっと複雑なシェルスクリプトを https://github.com/google/zx を使って書くとJavaScriptプログラマにとってはメンテナンスしやすい /lacolaco/lacolaco.iconはzx歴 3-4ヶ月ってところ (2021-08) 嬉しいところ async/awaitが使える 配列が扱いやすい モジュールで再利用しやすい 他のNode.jsライブラリと併用できる Prettierでフォーマットしやすい Lintしやすい エディタ支援が安心 Made by Google 微妙なところ JavaScriptプログラマ以外にとっては無用 とはいえシェルスクリプトによほど慣れてる人以外はよく整理されたJavaScriptのほうがセマンティクスを読み取りやすいのではないか スクリプト自体はこんな感じ(公式READMEより) code:js #!/usr/bin/en

    ちょっと複雑なシェルスクリプトをJavaScriptで書く - lacolaco-engineering
  • Start configured VPN from command line (OSX)

    I have two VPN configurations on my mac and I would like to be able to start them from the console when I ssh into my machine. I have found the command networksetup which allows me to configure connections, but as far as I can tell not actually start one. Using Lion.

    Start configured VPN from command line (OSX)
    Cherenkov
    Cherenkov 2021/08/04
    設定済みのvpnにコマンドラインで接続切断する方法
  • Connect to a VPN from the Command Line on Mac OS

    During Corona time, I have to connect to a VPN most of the time in order to work. I use two different VPNs depending on what I'm working on. I can select the network to connect to from the status bar at the top of the screen but there seems to be a bug: Sometimes there isn't anything to select, so I have to go to the network preferences and connect from there. This works, but it also bothers me. M

    Connect to a VPN from the Command Line on Mac OS
    Cherenkov
    Cherenkov 2021/08/04
    設定済みのvpnにコマンドラインで接続切断する方法
  • zshからfishにして1年が経ちました - deepblue-will’s diary

    Zshからfishにして1年ぐらい経ったので良かったこととか悪かったことを書きます。 fishとは? 公式サイトの冒頭の一文がこんなかんじ。 fish is a smart and user-friendly command line shell for macOS, Linux, and the rest of the family. ようするにとてもすごいコマンドラインシェルということです。 ちなみにfish は Finally shell の略らしいです。 fishの良いところ いっぱいあるのですが、インストールするだけ(設定なし)で以下のことができるのが一番のいいところです。 協力な補完機能 履歴からはもちろん、manページを解析してオプションとかの候補も出してくれる! シンタックスハイライト 使えないコマンドは赤く表示される! 起動が早い(zshと比べて) カラフルできれい fi

    zshからfishにして1年が経ちました - deepblue-will’s diary
    Cherenkov
    Cherenkov 2019/03/20
    「cdの後にlsする」
  • 全訳!fishシェル普及計画

    デフォルト の設定が貧弱→fishならば 無設定で便利機能満載 シェルスクリプト が苦手→fishスクリプトならば シンプル でわかりやすい 無駄に 多機能 で覚えきれない→fishは必要な機能を 厳選 している マニュアルが わかりづらい →fishのマニュアルは 具体例満載 でわかりやすい 設定ファイル を書くのが面倒→fishならば Webブラウザ で設定できる! 補完設定 を書くのが面倒→fishならばmanページを解析して 自動で 補完設定をしてくれる シングルクォート 中にシングルクォートを書けない→fishならば \’ と書ける 関数や環境変数を保存 するのに設定ファイルの書換えが面倒→fishならばその場で 永続化 できる 和訳 マニュアルがない→fishの 最新版公式文書を全訳済 他にもこんな便利機能があります。 Webブラウザのような Auto suggestion ま

    全訳!fishシェル普及計画
  • GitHub - Swordfish90/cool-retro-term: A good looking terminal emulator which mimics the old cathode display...

    You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

    GitHub - Swordfish90/cool-retro-term: A good looking terminal emulator which mimics the old cathode display...
    Cherenkov
    Cherenkov 2017/11/01
    ブラウン管風ターミナル skin
  • ShellCheck – shell script analysis tool

    GPLv3: free as in freedom documented on the ShellCheck Wiki available on GitHub (as is this website) already packaged for your distro or package manager supported as an integrated linter in major editors available in CodeClimate, Codacy and CodeFactor to auto-check your GitHub repo written in Haskell, if you're into that sort of thing.

  • bashの初見殺しっぷりがハンパない件 - Qiita

    「これ知らなきゃ分からないだろ!」 「エラーの原因はわかったけど、なんか腑に落ちない」 いま悩んだ2時間返せ! bashというか、UNIXのコマンドに慣れてない 僕みたいな新人エンジニアが 気をつけた方がいいポイントまとめました。 あいことばをわすれない 微妙にエラーが出ないため、気づかないまま進んでしまい、 のちのち絶妙に致命的なことになってしまうので注意。 一行目忘れて2時間悩みました 二行目のオプションつけなかったため2時間悩みました setのオプションはお好みで あいことばの解説: http://qiita.com/magicant/items/f3554274ee500bddaca8 半角スペースをつけるな!半角スペースをつけろ! shellさんはスペースに非常に神経質です。 よくある変数代入では=の前後にスペースいれてはダメです。

    bashの初見殺しっぷりがハンパない件 - Qiita
  • プログラマーの君! 騙されるな! シェルスクリプトはそう書いちゃ駄目だ!! という話 - Qiita

    記事が切っ掛けとなってお声がけを頂き、記事の増補リファイン版となる記事をSoftwareDesign 2018年1月号のシェルスクリプト特集第2章として執筆しました。リファイン版には、この記事で触れていない文法面での分かりにくさについての解説が含まれています。その文法面での分かりにくさの解説の一部に相当する記事もありますので、ぜひそちらも併せてご覧下さい。 Shell Script Advent Calendarをご覧の皆様、図々しくも5日目に続く2度目のエントリーのPiroです。 前回は自作のBashスクリプト製Twitterクライアントをネタに実装を解説しましたが、今日は他の言語で多少のプログラミング経験はあるんだけど、どうにもシェルスクリプトは苦手だ……という人のための、シェルスクリプトによるプログラミングの勘所を解説してみようと思います。多分、プログラミング入門レベルの人や上級

    プログラマーの君! 騙されるな! シェルスクリプトはそう書いちゃ駄目だ!! という話 - Qiita
  • cron上でのコマンド実行を再現する - Qiita


    cron  cron 使tips cron   rc cron cron
    cron上でのコマンド実行を再現する - Qiita
  • EnvironmentVariables - Community Help Wiki

    Environment variables provide a way to influence the behaviour of software on the system. For example, the "LANG" environment variable determines the language in which software programs communicate with the user. Environment variables consist of names that have values assigned to them. For example, on a typical system in the US we would have the value "en_US.UTF-8" assigned to the "LANG" variable.

    Cherenkov
    Cherenkov 2012/04/30
    .profileについて .bash_profile
  • Man page of BASH


    Section: User Commands (1) Updated: 2010 December 28 Index JM Home Page roff page  bash - GNU Bourne-Again SHell  bash [options] [file]  Bash is Copyright (C) 1989-2011 by the Free Software Foundation, Inc.  bash sh bash Korn C (ksh  csh) 便 bash  IEEE POSIX specification (IEEE Standard 1003.1)  Shell and Utili
    Cherenkov
    Cherenkov 2012/04/15
    [[ test 条件式は複合コマンド [[ と組み込みコマンドの test および [ によって使用でき、ファイルの属性を調べたり文字列比較や算術式比較 ‎[[ では < と > の演算子は現在のロケールでの辞書順で 比較。testは ASCII順で比較
  • Bash Reference Manual

    Bash Features This text is a brief description of the features that are present in the Bash shell (version 5.2, 19 September 2022). The Bash home page is http://www.gnu.org/software/bash/. This is Edition 5.2, last updated 19 September 2022, of The GNU Bash Reference Manual, for Bash, Version 5.2. Bash contains features that appear in other popular shells, and some features that only appear in Bas

  • kuroyanagi/dotfiles · GitHub

    Dismiss Octotip: You've activated the file finder by pressing t Start typing to filter the file list. Use ↑ and ↓ to navigate, enter to view files.

    Cherenkov
    Cherenkov 2012/04/13
    設定ファイルをgitで管理 .bashrcなど
  • zsh使いなら効率改善のため知っておきたいAUTOJUMP - Glide Note

    joelthelion/autojump - GitHub zsh補完関数の書き方をいろいろ調べていたら、autojump-zshというパッケージを発見。 気になって使ってみたらめちゃくちゃ便利で、久々に感動したので紹介。 autojumpはcdコマンドの拡張的なコマンドで、移動したディレクトリを記録し、 ディレクトリ間を行ったり来たりするときに絶大な効果を発揮します。 公式wikiに書いてあるよう コマンドライン作業の10〜20%はcdコマンドのため、ディレクトリ移動の動作が 改善すると必然的に作業効率も向上するということです。 実際私もautojumpを使い出してから、作業効率が上がりました。 それでは早速autojumpの説明を。動作検証環境は下記です。 Mac OSX 10.7.3 Fedora 16 Scientifix Linux 6.1 導入方法 autojumpを利用するに

  • 第5回 zshの誇る花形機能“補完” | gihyo.jp


    zshzsh150便  zsh autoload -U compinit && compinit 2 Tab (C-i) - expand-or-complete  ESC C-d ( C-d) - list-choices (delete-char-or-list) 
    第5回 zshの誇る花形機能“補完” | gihyo.jp
    Cherenkov
    Cherenkov 2011/12/10
    大文字 小文字 区別せずに補完 置換 補間
  • cat コマンドでネコを走らせる - hogehoge @teramako


    RT https://github.com/teramako/scripts/blob/master/shell/cat.sh cat  concatenate  bash ~/bin/catCPerlCPerl... 2 1      
    cat コマンドでネコを走らせる - hogehoge @teramako
  • Selfkleptomaniac — PHP on Ruby (on PHP on Ruby on…)

    Blogging is a disease: selfkleptomania, your normal condition. About GPG Public Key 同僚がphpDocumentorのソースに変なことが書いてあるというので見ると、確かに変だ。長いコメント部分を除くとこうなっている。 #!/bin/sh if [ -z "$PHP" ]; then PHP=`which php` fi (exec $PHP -C -q -d output_buffering=1 "$0" "$@") 2>/dev/null if [ "$?" -ne "0" ]; then echo "FAILED: Bad environment variable \$PHP (set to \"$PHP\")" exit 1 fi exit 0 <?php ob_end_clean(); // mak

  • Rubyの構文でシェルを実現する「rush」 | エンタープライズ | マイコミジャーナル

    Webブラウザ上でRuby on Railsアプリケーションの開発を可能にするサービス「Heroku」の開発者Adam Wiggins氏のブログで、「rush」と呼ばれるRuby言語を用いたシェルが紹介されている。 rushは同氏が開発を行っているシェル。シェルとして現在もっとも一般的に利用されているのはbashであるが、同氏はbashにはさまざまな問題があるとしている。 たとえば、少し複雑なことを行おうとすると、シングルクォートやダブルクォート、バッククォートが入れ子になり、記述するのも理解するのも困難になってしまう。また、シェルでパイプを用いて複数のコマンドを組み合わせた場合、値の受け渡しはすべて空白と改行区切りを基としたテキストデータで行われるため、値として空白文字が含まれいる場合には問題が発生することもある。そのほか、シェルから呼び出されるcpやmv、grep、sedといったコマ

    Cherenkov
    Cherenkov 2011/06/29
    コマンドライン