2022년 10월 30일 일요일
UBUNTU 에서 Anaconda prompt 설정 선택
https://ieworld.tistory.com/12
$ conda config --set auto_activate_base False
2022년 10월 24일 월요일
echo "${PATH//:/$'\n'}" PATH 환경 변수 보기 좋게 출력하기.
echo "${PATH//:/$'\n'}"
echo -e ${PATH//:/\\n}
https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html
1) ${parameter//pattern/string}
If there are two slashes separating parameter and pattern (the second form above), all matches of pattern are replaced with string.
parameter 와 pattern 을 분리시키는 슬래시가 2개이면, 모든 pattern 이 string 으로 교체된다.
2) ${parameter/pattern/string}
In the first form above, only the first match is replaced.
parameter 와 pattern 을 분리시키는 슬래시가 1개이면, 첫 번째 pattern 만 string 으로 교체된다.
https://stackoverflow.com/questions/13925879/what-does-n-mean-in-bash
$'\n' 의미 --> new line 으로 변환.
bash 에서 $'string' 형태의 단어는 특별하게 처리된다.
역슬래시(\)로 escape된 단어는 ANSI C 표준에서 규정된 대로 변환된다.
Words of the form $'string' are treated specially. The word expands to string, with back‐
slash-escaped characters replaced as specified by the ANSI C standard. Backslash escape
sequences, if present, are decoded as follows:
\a alert (bell)
\b backspace
\e
\E an escape character
\f form feed
\n new line
\r carriage return
\t horizontal tab
\v vertical tab
\\ backslash
\' single quote
\" double quote
\? question mark
\nnn the eight-bit character whose value is the octal value nnn (one to three oc‐
tal digits)
\xHH the eight-bit character whose value is the hexadecimal value HH (one or two
hex digits)
\uHHHH the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value
HHHH (one to four hex digits)
\UHHHHHHHH
the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value
HHHHHHHH (one to eight hex digits)
\cx a control-x character
The expanded result is single-quoted, as if the dollar sign had not been present.
참고 글
https://m.blog.naver.com/PostView.naver?isHttpsRedirect=true&blogId=5bpa&logNo=220668733558
피드 구독하기:
글 (Atom)