๋ฐ์ํ
250x250
Notice
Recent Posts
Recent Comments
Link
์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- rpmbuild
- airflow
- ์๋ผ์คํฑ์์น
- ํด ์ค์น
- ํ์ด๋ธ
- ์ค์นผ๋ผ ๋ถ
- aws ccp
- ansible
- ์ค์๋ธ
- CLF-C02
- ๋ฆฌ๋ ์ค RPM
- ํ๋ก์์ฝ์์คํ
- ํ๋ก์ค์น
- ์ค์๋ธ ์ค์น
- ๋ฆฟ์ฝ๋
- HBase
- ์ฑ๊ธ์๋ฒ
- LeetCode
- standalone
- hadoop
- ๋น ๋ฐ์ดํฐ
- ํ๋ก
- elastic stack
- ๋ฆฌ๋ ์ค
- kudu
- Apache spark
- ๋ฐ์ดํฐ๋ถ์์ค์ ๋ฌธ๊ฐ
- ์ํ์น ์คํํฌ
- BIGDATA
- ์คํํฌ
Archives
- Today
- Total
๋ชฉ๋กLeetCode (2)
data_lab
[leetcode] shell - Valid Phone Numbers
1 2 3 4 5 # Read from the file file.txt and output all valid phone numbers to stdout. #!/bin/sh sed -n -r '/^([0-9]{3}-|\([0-9]{3}\) )[0-9]{3}-[0-9]{4}$/p' file.txt Colored by Color Scripter cs
๋ฏธ์ฌ์ฉ/์๊ณ ๋ฆฌ์ฆ ์ ๋ฆฌ
2021. 6. 14. 21:46
[leetcode] shell - Tenth Line
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 # Read from the file file.txt and output the tenth line to stdout. #!/bin/sh line_number=$(wc -l ./file.txt | awk '{print $1}') #echo $(expr ${line_number}) cat ./file.txt | while read line do if [ ${line_number} -eq 10 ] then echo $(cat file.txt | sed -n 10p) break else echo $(cat file.txt | sed -n 10p) break fi done Colored by Color Scripter cs
๋ฏธ์ฌ์ฉ/์๊ณ ๋ฆฌ์ฆ ์ ๋ฆฌ
2021. 6. 14. 21:44