並び順

ブックマーク数

期間指定

  • から
  • まで

401 - 440 件 / 1040件

新着順 人気順

シェルスクリプトの検索結果401 - 440 件 / 1040件

  • ゼロからはじめるPython(83) Pythonシェル徹底活用 - 快適CUI生活のススメ

    Pythonには対話的にプログラムを実行できるPythonシェルが備わっている。きっとPython学習の際に使ったことがあると思う。とはいえ学習用だけに限定するのは非常にもったいない。筆者は事あるごとに計算やカレンダー、フォルダを開いたりと、いろいろな用途に使っている。今回は、Pythonシェルを便利に使うアイデアを7つ紹介する。 Pythonシェルとは? そもそも、Pythonシェルとは何だろうか。Pythonをインストールすると一緒についてくる対話式実行環境のことだ。WindowsでPythonシェルを起動するには、スタートメニューから「Python3.x > IDLE」を実行するか、PowerShellを起動して「python3」とタイプすれば良い。macOSではターミナル.appを起動して「python3 」とタイプしよう。 Pythonシェルが起動すると「>>>」と表示されるので

      ゼロからはじめるPython(83) Pythonシェル徹底活用 - 快適CUI生活のススメ
    • Brian Tracy - copy-paste-shell

      Don't Copy Paste Into A ShellWhen you see a shell command on the Internet, do not copy it into your terminal. Modern JavaScript Clipboard APIs allow a website to trivially overwrite what you put inside your clipboard, without the user's confirmation or permission. Here is an example of how easy it is to perform this attack. Imagine that the red text below is a shell command you want to use. Below

      • Microsoft、「PowerShell 7.1」を一般公開 ~Windows 10なら“Microsoft Store”から入手可能/「.NET 5.0」上に構築されたクロスプラットフォーム対応「PowerShell」の最新版

          Microsoft、「PowerShell 7.1」を一般公開 ~Windows 10なら“Microsoft Store”から入手可能/「.NET 5.0」上に構築されたクロスプラットフォーム対応「PowerShell」の最新版
        • シェルスクリプトは ((i=i+1)) ではなく i=$((i+1)) で計算しなければいけない!という話 - Qiita

          count=0 max=5 while ((count < max)); do # (( 算術式 )) は条件文で使うものです count=$((count + 1)) # 計算したいだけなら算術式展開を使います echo "$count" done ついでに言うと (( 算術式 )) は POSIX シェルで規定されていません。bash、ksh、mksh、zsh では使えますが dash、yash などの純粋な POSIX シェルに近いシェルでは使えません。 なぜ? (( 算術式 )) を使って変数に値を代入したり変更することができますが、それだけのために使ってはいけません。if や while などの条件文とともに使うものです。 C 言語を使ってる人なら比較的見かける書き方だと思いますが、(( 算術式 )) で値を変えるというのは、以下のように評価するついでに値も変えちゃえと、短く書く

            シェルスクリプトは ((i=i+1)) ではなく i=$((i+1)) で計算しなければいけない!という話 - Qiita
          • WindowsアップデートでLinuxカーネルもアップデートされる時代に - Qiita

            このたびラップトップを新調しました。6年ほど前に中古のノートにLinuxを入れてつかってましたが、新品のWindowsノートに乗り換えました。そこで以前から気になっていたWindows Subsystem Linuxを使って、Windows上にLinuxの開発環境を用意してみたところ、セットアップもすごく簡単かつ快適な開発環境になったので、詳細を少し調べてみました。その結果と実際の開発現場における利用シーンについて紹介します。 ※現段階ではPreview版OSへのアップデートが必要。WSL2を利用するにはbuild 18917以上のOSバージョンが必要です。それにはthe Windows Insider Programというプログラムに登録した上で、OSをPreview版にアップデートする必要があります。 ターミナルを開くとそこはもうLinuxでした 近頃の私が個人的なLinux環境でやる

              WindowsアップデートでLinuxカーネルもアップデートされる時代に - Qiita
            • Spring4Shell: Security Analysis of the latest Java RCE '0-day' vulnerabilities in Spring | LunaTrace

              Getting Spring to load BinderControllerAdvice may require manual steps to have it load. We'll update this guide with more details about how to do that soon. import org.springframework.core.Ordered; import org.springframework.core.annotation.Order; import org.springframework.web.bind.WebDataBinder; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.

                Spring4Shell: Security Analysis of the latest Java RCE '0-day' vulnerabilities in Spring | LunaTrace
              • An Opinionated Guide to xargs

                Preliminaries What Is xargs? It's an adapter between text streams and argv arrays, two essential concepts in shell. You pass it flags that specify how to split stdin. Then it generates arguments and invokes processes. Example: $ echo 'alice bob' | xargs -n 1 -- echo hi hi alice hi bob What's happening here? xargs splits the input stream on whitespace, producing 2 arguments, alice and bob. We passe

                • GitHub - atuinsh/atuin: ✨ Magical shell history

                  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 - atuinsh/atuin: ✨ Magical shell history
                  • iOSエンジニアが開発効率のために最低限知るべきシェルスクリプト入門

                    bashやzsh,ターミナルは弄っていますか?黒い画面は古臭いと思ってませんか? iOSエンジニアと言えどXcode上でSwiftをコーディングだけが全てではありません。 CocoaPodsやCarthage、fastlane などエコシステムはシェルコマンド操作が必須です。 またAPIとの通信にシェルスクリプトを使うことで、効率よく情報を集めたり事前準備できたりします。 シェルスクリプトはSwiftと同じただの道具です。使い方を覚えて視野を広げましょう。 この記事で基礎知識を得よう この記事では難しいイディオムテクニックが書けるなどではなく、基本を理解してシェルスクリプトを読めるようになるための土台作りだとイメージしてください。 この土台を踏み台に少しずつシェルスクリプトに触れていくことで、より生産性の高いスキルを身に付けれるかと思います。 bashやzsh, fishと色々あるが基本は

                      iOSエンジニアが開発効率のために最低限知るべきシェルスクリプト入門
                    • プログラミング初心者でも簡単・Linuxでコマンドを自作する方法 - paiza times

                      もじゃ(@s10akir)です。paizaラーニングでプログラミング学習動画制作のアルバイトをしたりバイト中にアニメを見たりしている専門学生です。 最近paizaラーニングで「Linux入門編」が公開されました。やったー!(私はLinuxのオタクです)Linux入門編では、Linuxの特徴であるコマンドライン操作について学べます。 こういったシェルコマンドって、どのような仕組みで動いているのか気になりませんか?(気になるって言ってください!) 今回は、実際に自分でシェルコマンドを作ってみつつ、Linuxでのコマンド実行の流れをざっくり確認してみましょう。 ※この記事内では" $ hogehoge "という表記がよく出てきますが、$はターミナルで打つコマンドであるということです。(実際のターミナルに$は入力しません) なおバイト中にアニメを見ている様子はこちら。 paiza.hatenabl

                        プログラミング初心者でも簡単・Linuxでコマンドを自作する方法 - paiza times
                      • AWS CLI短縮構文をシェルスクリプトから使うときに陥りやすい罠|Dentsu Digital Tech Blog

                        電通デジタルでSREをしている神田です。突然ですが、みなさんAWS CLI短縮構文をご存知でしょうか? awsコマンドを使っているときに、コマンドのオプションとしてfoo=bar や foo,bar,baz といった構造を持ったパラメータを要求されることがあります。このパラメータを記述するための構文が短縮構文(shorthand)です。 本記事では、普段なんとなくお世話になっている短縮構文をシェルスクリプトから使ったときに陥りやすい罠を紹介します。 AWS CLI短縮構文の簡単な例 短縮構文は、JSONと等価な値を簡潔に表現するための構文です。JSONとの対応をみると内容を理解しやすいです。 例えば、 ["foo","bar","baz"]というJSONの配列は、短縮構文では、 foo,bar,bazと書くことができます。 また、 {"key1": "val1", "key2": "val

                          AWS CLI短縮構文をシェルスクリプトから使うときに陥りやすい罠|Dentsu Digital Tech Blog
                        • GitHub - binpash/try: Inspect a command's effects before modifying your live system

                          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 - binpash/try: Inspect a command's effects before modifying your live system
                          • 「Git for Windows」のシェルが「bash 4.4」から「bash 5.1」へ ~Vista対応も終了/シェルスクリプトの互換性問題に注意

                              「Git for Windows」のシェルが「bash 4.4」から「bash 5.1」へ ~Vista対応も終了/シェルスクリプトの互換性問題に注意
                            • A list of new(ish) command line tools

                              Hello! Today I asked on twitter about newer command line tools, like ripgrep and fd and fzf and exa and bat. I got a bunch of replies with tools I hadn’t heard of, so I thought I’d make a list here. A lot of people also pointed at the modern-unix list. replacements for standard tools ripgrep, ag, ack (grep) exa, lsd (ls) mosh (ssh) bat (cat) delta (a pager for git) fd (find) drill, dog (dig) duf (

                              • MacOS ユーザが WSL では無い Windows のコンソール環境を整える - A Day in the Life

                                先日、メインの開発環境を MacOS から Windows 10 Professional へと移しました。理由としては主に2点で、現在仕事を自宅の固定席で行っており PC を持ち運びする必要がなくなったため Mac より高速で安価な Windows デスクトップ機を使いたいこと(Ryzen 9使いたい!)、WSL2 が正式版となり使ってみた感じ問題なく WSL2 で仕事の開発ができそうだったことが挙げられます。 WSL2 はふつうに Linux なので問題なく開発環境の構築が行なえ、Windows からも VSCode Remote のおかげでで違和感なくWSL2上のコードを編集、実行ができ快適な開発が行えています。(なお、WSL2 についての記事は山程溢れているので、ここでは殆ど触れません。) しかしながら、WSL2 ではないふつうの Windows 上で開発する機会が出てきたので、M

                                  MacOS ユーザが WSL では無い Windows のコンソール環境を整える - A Day in the Life
                                • The Bun Shell | Bun Blog

                                  JavaScript is the world's most popular scripting language. So why is it hard to run shell scripts in JavaScript? import { spawnSync } from "child_process"; // this is a lot more work than it could be const { status, stdout, stderr } = spawnSync("ls", ["-l", "*.js"], { encoding: "utf8", });

                                  • Talos Linux

                                    What is Talos Linux?Talos Linux is Linux designed for Kubernetes – secure, immutable, and minimal. Supports cloud platforms, bare metal, and virtualization platformsAll system management is done via an API. No SSH, shell or consoleProduction ready: supports some of the largest Kubernetes clusters in the worldOpen source project from the team at Sidero Labs

                                    • GitHub - joehillen/sysz: An fzf terminal UI for systemctl

                                      VERSION: 1.4.3 See and filter both system and user units simultaneously. Supports all unit types. Units ordered by service, timer, socket, and the rest. Runs sudo automatically and only if necessary. Filter units by state using ctrl-s or the --state option. Run daemon-reload with ctrl-r. Has short versions of systemctl commands to reduce typing. Runs status after other commands (start, stop, resta

                                        GitHub - joehillen/sysz: An fzf terminal UI for systemctl
                                      • Espanso - A Privacy-first, Cross-platform Text Expander

                                        I'd like to give a shout out to @terzi_federico for creating Espanso: https://espanso.org, an Open Source text expander. Gotta love tools like these. I've just installed it and already know that it'll save me hours and hours! :) Sébastien DuboisAuthor, Crafter for 15+y, CTO, Indie Hacker One of my favourite free productivity tools is espanso https://espanso.org It's a text expander. I mostly use i

                                        • Welcome to Linux command line for you and me! — Linux command line for you and me 0.1 documentation

                                          Linux command line for you and me is a book for newcomers to the command line environment. Feedback is greatly appreciated. If you have any questions, comments, random praise, or anonymous threats, shoot me an email. Useful Links lym @ GitHub Issue Tracker

                                          • GitHub - cyberark/bash-lib: Library for bash utility methods and tools

                                            _______________ _______________ .' .' .| .' .' .' | .'_______________.'______________ .' | | ___ _____ ___ || ___ _____ ___ | | ||_=_|__=__|_=_||||_=_|__=__|_=_|| | ______||_____===_____||||_____===_____|| | __________ .' ||_____===_____||||_____===_____|| .' .'| .' ||_____===_____||||_____===_____|| .' .' | .'___________|_______________||_______________|.'__________.' | |.----------.|.-----___---

                                              GitHub - cyberark/bash-lib: Library for bash utility methods and tools
                                            • GitHub - Overv/outrun: Execute a local command using the processing power of another Linux machine.

                                              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 - Overv/outrun: Execute a local command using the processing power of another Linux machine.
                                              • [待望] CloudShell で Docker が利用可能になりました | DevelopersIO

                                                待望の CloudShell で Docker が使えるようになりました。今回は簡単に全体像まとめて、コンテナイメージをビルドしてみました。 こんにちは! AWS 事業本部コンサルティング部のたかくに(@takakuni_) です。 タイトルの通りで CloudShell で docker コマンドが使えるようになってました。 今まではどうだったか 今まで、 CloudShell では Docker がサポートされておらず、コンテナイメージのビルド等が CloudShell 上で行えませんでした。 過去の Stack Overflow を確認するに、インストールはできるが、デーモンの起動ができなかったようです。 [cloudshell-user@ip-10-0-73-203 ~]$ docker images Cannot connect to the Docker daemon at u

                                                  [待望] CloudShell で Docker が利用可能になりました | DevelopersIO
                                                • GitHub - charmbracelet/glow: Render markdown on the CLI, with pizzazz! 💅🏻

                                                  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 - charmbracelet/glow: Render markdown on the CLI, with pizzazz! 💅🏻
                                                  • プレビュー版が登場したWSLのVer.2.0 新機能を具体的に見る (1/2)

                                                    Windows Subsystem for LinuxのプレビューVer.2.0が9月に公開された。WSL2と混同を避けるため、これをWSL V2.0と表記する。 現在、WSLはMicrosoftストア経由で配布されており、自動的にアップデートされる。ただし、WSL V2.0はまだプレビュー段階で、安定版はV1.2.5だ。このため、Windows Insider Programのプレビュー版ではないWindows 11では、当面は安定版のままになる。ただし、強制的にプレビュー版をインストールすることはできる。 追加される機能自体はそれほど難しいものではないが、動作条件などが複雑で、また既存のプログラムに影響を与える可能性があることから、評価やテストなどには十分な注意が必要と言える。実験的機能であることから、WSLや動作しているプログラムに大きな影響が出る可能性もある。日常的にWSLを使って

                                                      プレビュー版が登場したWSLのVer.2.0 新機能を具体的に見る (1/2)
                                                    • Windowsの中で本物のLinuxが動く、WSL2の驚異の実力

                                                      Windows 10ではLinux実行環境の「WSL」(Windows Subsystem for Linux)が標準搭載され、「本物のLinux」がすぐに使えるようになりました。最新版の「WSL2」について、導入方法や基本的な使い方などを解説します。 Windows 10が動くPCが1台あれば、Windowsを普段通り使いながら“本物のLinux”も同時に動かせる――。そんな素晴らしい環境をいとも簡単に構築できるのが「WSL」(Windows Subsystem for Linux)です。今回は、WSLの基本的な仕組みを押さえた上で、最新のWSL2を導入する方法を紹介します。 読者のみなさんは、日頃どんなPC環境でLinuxを使っているでしょうか。Linux専用のPCを持っている人も多いと思いますが、PCが1台しかなく、マルチブートやUSBブートでWindowsと切り替えて使っているとい

                                                        Windowsの中で本物のLinuxが動く、WSL2の驚異の実力
                                                      • GitHub - sachaos/viddy: 👀 A modern watch command. Time machine and pager etc.

                                                        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 - sachaos/viddy: 👀 A modern watch command. Time machine and pager etc.
                                                        • 「Windows Package Manager」がv1.1に ~Windows 10/11で利用できるCUIのアプリ管理ツール/「Microsoft Store」に登録されているアプリもインストール可能

                                                            「Windows Package Manager」がv1.1に ~Windows 10/11で利用できるCUIのアプリ管理ツール/「Microsoft Store」に登録されているアプリもインストール可能
                                                          • シェルの履歴とイクンリメンタル検索を使う

                                                            社内のテックトークで LT したスライドです

                                                              シェルの履歴とイクンリメンタル検索を使う
                                                            • GitHub - xxh/xxh: 🚀 Bring your favorite shell wherever you go through the ssh. Xonsh shell, fish, zsh, osquery and so on.

                                                              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 - xxh/xxh: 🚀 Bring your favorite shell wherever you go through the ssh. Xonsh shell, fish, zsh, osquery and so on.
                                                              • Unix command line conventions over time

                                                                ETA, 2022-05-19: I’m happy this blog post has gathered a fair bit of interest. However, this post is as much effort as I’m prepared to put into the topic. I think it would be a good idea to write an essay, article, or even a book, on how syntax of the Unix command line has varied over the years, and in different subcultures. Something semi-scholarly with cited sources for claims, and everything. I

                                                                • Tmux for mere mortals

                                                                  Tmux has liberated me from tiling window mangers. Not that I didn’t like those, but I occasionally have to work with macOS or default GNOME setups. And over the years I realised that I only need a terminal multiplexor to do terminal tiling for me, the rest of the windows are just fine to be full-screen in separate workspaces. So, I ended up doing 80% of my work in terminals with tmux. But, the pre

                                                                  • Homebrew 3.0.0リリース

                                                                    B! 37 0 0 0 Mac/Linuxのパッケージ管理ツールHomebrewの3.0.0がリリースされました。 メジャーアップデートになりますが、今回はApple Silicon搭載のMacへの対応が メインのアップデートになっています。 Homebrewの歴史 3.0.0での目玉アップデート 3.0.0でのその他のアップデート 新しい設定: HOMEBREW_BOOTSNAP いろいろなコマンドが削除された Bash/Zsh/Fish用の補完ファイルが自動生成される様になった 新しいコマンド: brew completions brew updateでよりうまいことサーバー側のブランチの変更を扱う brew untapしたものは自動でtapしないように 新しいコマンド: brew casks まとめ Homebrewの歴史 せっかくのメジャーアップデートなのでちょっと過去のアップデー

                                                                      Homebrew 3.0.0リリース
                                                                    • 初心者でもシェルコマンド・スクリプトの使い方が学べる入門レッスン - paiza times

                                                                      こんにちは。谷口です。 今回は、これからシェルに入門したい方、プログラミング初心者の方向けに、paizaラーニングでシェルの基礎が学べる「シェルコマンド入門編」についてご紹介します。 シェルコマンドって何? LinuxやUNIXなどのOSを利用するときに欠かせないのがシェルコマンドです。シェルにはいろいろな種類がありますが、最近のLinuxやMacなどでは、bashがシェルの標準環境とされ、広く使われています。 ざっくり言うと、OSを使いたい時に、OSと我々ユーザーの仲介役をしてくれるのがシェルです。 たとえば、コマンドやスクリプトを入力すると、その入力された処理内容をカーネル(OSの核となる、処理を実行してくれる部分です)に依頼してくれたり、処理中に何らかのエラーが発生した時に、われわれでも理解できるようなエラーメッセージを出力してくれたり…というように、OSとユーザーの間を取り持ってく

                                                                        初心者でもシェルコマンド・スクリプトの使い方が学べる入門レッスン - paiza times
                                                                      • mysqlsh (MySQL Shell): Dump and Restore in AWS Aurora - LayerX エンジニアブログ

                                                                        LayerX インボイス を開発しているDX事業部の @yyoshiki41(中川佳希)です。 DX事業部ではデータベースとして MySQL(Amazon Aurora)を利用しています。 今回のブログは、mysqlsh (MySQL Shell) を用いて、Dumpデータ取得とリストアを行う際に気をつける点です。 mysqldump, mysqlpump Dumpデータ取得を行う際に、広く知られているのが mysqldump かと思います。 MySQL 5.7.8 からは、 mysqlpump という別のクライアントツールも提供されるようになりました。 主に下記のような特徴があります。 並列での処理が行われる(Parallel) Dump Progress がみれる 圧縮方式は、LZ4 と ZLIB が使用可能(mysqlpump Ver 1.0.0 Distrib 5.7.35) TA

                                                                          mysqlsh (MySQL Shell): Dump and Restore in AWS Aurora - LayerX エンジニアブログ
                                                                        • Golangでバイナリを配布するとき、go-licensesとgoxzを使って利用モジュールのLICENSE、NOTICEを同梱する - 理系学生日記

                                                                          Golangで作ったプロダクトを公開・配布するとき、課題となるのが利用するモジュールのライセンスです。 MITライセンスであれ、MPLライセンスであれ、利用するモジュールのLICENSEやNOTICEファイルを同梱することになるでしょう。 goxzとgo-licensesを使うと、クロスビルドした実行バイナリと利用モジュールのLICENSE等を含め頒布物を作成できるようになります。 最終イメージ 同梱されていることの確認 go-licenses ハマりポイント goxz まとめ 最終イメージ 最終イメージですが、以下のようなMakefileを用意しました。 プロダクトに設定したライセンスで利用できないモジュールがあるかどうかをlicense-checkで確認した後、cross-build.shを呼び出します。 .PHONY: license-check license-check: go-

                                                                            Golangでバイナリを配布するとき、go-licensesとgoxzを使って利用モジュールのLICENSE、NOTICEを同梱する - 理系学生日記
                                                                          • clapでシェルの補完スクリプトを生成する

                                                                            はじめに この記事では、2022年1月にリリースされたclapとclap_completeクレートを使って、シェルの補完スクリプトを生成する方法を紹介します。 clapはRustのコマンドライン引数パーサーです。 豊富な機能を備えており、Rustではデファクトスタンダートになっているライブラリです。 近年の他のプログラミング言語のコマンドライン引数パーサー——例えば、Pythonのargcomplete、clickやcleo、Goのgo-flags——同様に、補完スクリプトの生成に対応しています。 clapはBuilderパターンによるパーサーの構築が素の使い方ですが、バージョン3でderiveマクロによるパーサーの構築が安定化されました。 Builderパターンによるパーサーの構築——この機能はBuilder APIと呼ばれています——では、以下のようなコードでパーサーを記述します。構造

                                                                              clapでシェルの補完スクリプトを生成する
                                                                            • 「dotfiles」で、”スマートなMac設定移行” をする方法

                                                                              「dotfiles」で、”スマートなMac設定移行” をする方法 ゴール 以下のような、1行のコマンドだけで設定が完了することを目指しました。 /bin/zsh -c "$(curl -fsSL https://raw.githubusercontent.com/watsuyo/dotfiles/master/shell/setup)" yes/noやパスワードの入力を省略させることも可能ですが、今回は確認しながら設定を行いたかったため、厳密には1行のコマンド + 数回の入力があります 概要 Web業界でエンジニアをしていると数年に一度は、MacBookの環境構築をする機会があります。 今回は、社内でMacBook Pro M1 2021の支給が始まったことをきっかけに、dotfilesを作成して開発環境のセットアップをできる限り自動化させたので、その知見共有をします。 dotfiles

                                                                                「dotfiles」で、”スマートなMac設定移行” をする方法
                                                                              • Browser-based Shell - AWS CloudShell - AWS

                                                                                AWS CloudShell Explore and manage AWS resources from a terminal in your browser

                                                                                  Browser-based Shell - AWS CloudShell - AWS
                                                                                • Sockets In Your Shell

                                                                                  Something I learned recently and I thought was amazing - you can create sockets straight from your shell! Well, assuming you use bash or zsh - from some surface level digging, I couldn’t find anything for fish. Here’s how it works: bash Bash supports tcp and udp connections out of the box, and does so with an imaginary device in /dev. Enter And you’ll create a connection to HOST:PORT. $PROTO can b