[Leetcode]195.tenth-line

2020-02-22
阅读 2 分钟
1.2k
题目 Tenth Line Given a text file file.txt, print just the 10th line of the file. Example: Assume that file.txt has the following content: {代码...} Your script should output the tenth line, which is: {代码...} 注意点 需要注意一下它提供的note,其实test也涵盖了note提到的两点: Note: If the file co...

[Leetcode]194.transpose-file

2020-02-22
阅读 2 分钟
1k
You may assume that each row has the same number of columns and each field is separated by the ' ' character.

[Leetcode]193.valid-phone-numbers

2020-02-22
阅读 2 分钟
1k
Given a text file file.txt that contains list of phone numbers (one per line), write a one liner bash script to print all valid phone numbers.

[Leetcode]192.word-frequency

2020-02-22
阅读 2 分钟
1.4k
Write a bash script to calculate the frequency of each word in a text file words.txt.