Alpine 명령어

2021. 12. 11. 09:20OS

usb 마운트

fdisk -l

mkdir /mnt/usb

mount /dev/sdc1 /mnt/usb

failed: Invalid argument 에러 발생

mount -t -vfat /dev/sdc1 /mnt/usb

변수 설정

result=`kubectl get secret -n {namespace} --kubeconfig=docker/config | grep {pod이름}`
echo ${result}

if else

https://linuxhandbook.com/if-else-bash/

 

Using If Else in Bash Scripts [Examples]

In this chapter of bash beginner series, you'll learn about using if-else, nested if else and case statements in bash scripts.

linuxhandbook.com

https://www.tutorialspoint.com/unix/if-else-statement.htm

 

#/bin/sh
result=`kubectl get secret -n {namespace} | grep {pod이름}`
# 결과값이 없으면
if [ "" != "${result}" ]
then
	echo ${result}
else
	echo "There is"
fi

 

'OS' 카테고리의 다른 글

CentOS 설치  (0) 2021.12.25
핸드폰 루팅  (0) 2021.12.11
Centos 명령어  (0) 2021.12.11
Alpine 설치  (0) 2021.12.11
Termux 사용하기  (0) 2021.11.28