python버전구분자

Leejaegun·2024년 12월 16일
0

Python & etc

목록 보기
8/27

PYTHON_VERSION="$(python --version | cut -d " " -f 2 | cut -d "." -f 1-2)"

python --version → Python 3.10.5
첫 번째 cut -d " " -f 2 → 3.10.5
-d는 delimiter 구분자 -f 는 field 그 위치.

두 번째 cut -d "." -f 1-2 → 3.10

profile
Lee_AA

0개의 댓글