2024/1/24 -便利かなと思い、シェルスクリプトの勉強も兼ねスクリプトを書いてみました。シェル ... ファイルを氣輕に暗号化できるスクリプトを書く. Linux ... x "$1" ;; *.gz) gunzip " ...
2024/2/15 -How do I tell whether a program is installed and is executable from within a script? With some programs this works, eg ls > null 2>&1 && echo exists
2024/4/5 -Explains how to find out current time and store to a shell variable under UNIX / Linux / BSD / macOS (OS X) shell scripting.
2024/3/18 -# Convert command convert "$file" -resize "x$1" "$output_file" Copy. Let's try a small and a large height value: $ ./convert.sh 512 ~/img_original/test_1.jpg ...
2023/12/22 -I am working on VM Linux Ubuntu and my goal is to form this input 4,4 3,8 4,2 4,8 6,8 5,1 4,5 6,9 4,2 5,4 5,9 5,9 7,2 4,9 4,4 5,1. to this output 4,4 6,8 4,2 ...
2024/3/28 -Linux text manipulation. Today, I ... Through a quick search, I found a tiny bash script, sp, that does what I need. ... NR==1{x=$1}{print x}. now we can combine ...
2024/5/11 -#!/bin/sh test x"$SHELL" = x"" && SHELL=/bin/bash test x"$1" = x"" && set -- default unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS vncconfig -iconic ...
2024/5/3 -... Linux VMs deployed in my vSphere based home lab. ... #!/bin/sh if [ x$1 = x"precustomization" ]; then echo "Do Precustomization tasks" # append group to sudoers ...
2024/2/23 -This article introduces how to avoid adding an ipv6 loopback entry mapping to FQDN in the /etc/hosts during guest OS customization. Symptoms:
2024/1/17 -Issue description. I'm trying to implement .bashrc content in a declarative manner but if I use its content inside HM Bash module in bashrcExtra or ...
A.最近何故か cal.sh に関する質問が多いですね。 多分、ある学校で課題として出題されてるのでしょうね。 >x,y,zの値に不適切な入力値がある場合や、引数の数が2つより少ない場合 &...
Q.Linuxのシェルスクリプトの添削をお願いします。 添付ファイルについて下記のように作成したのですが、次の要件を満たすためには具体的にどのように修正したらよいのでしょうか。ご回答お願い致します。...
A.問題文では「引数をインクリメントする」って書かれているのに、なんで、 >③for文((i=$1 ; i%9 ; i++))の部分を((i=$1 ; i%9 ; i++))の形で使用せず、他の構文や
Q.Linux上のbashシェルでの実数比較 (ファイルから読み込んだ値)がうまくいきません. Linux(OpenSuse11.4)上のbashでシェルを組み, 数値データを書いたファイルを読み込...
A.Cygwinでは改行コードがCR+LFなのですがLinuxではLFのみです。 CR=^Mなのでそれを取り去ればいいわけですね。 取り去る方法としては nkf -Lu bc_last.dat >