首页 > 技术文章 > arts-week13

okokabcd 2018-10-15 19:29 原文

Algorithm

  1. 992. Sort Array By Parity II - LeetCode

Review

https://tls.ulfheim.net/

HTTP协议图解

Tip

linux命令删除重复行

sort -n test.txt | uniq
sort -n test.txt | awk '{if($0!=line)print; line=$0}'
sort -n test.txt | sed '$!N; /^\(.*\)\n\1$/!P; D'

文本行数的统计

awk '{print NR}' test.txt | tail -n1
awk 'END{print NR}' test.txt

grep -n '' test.txt | awk -F : '{print $1}' | tail -n1
grep -n '' test.txt | awk -F : 'END{print $1}'

sed -n '$=' test.txt

wc -l test1.txt
wc -l test1.txt | awk '{print $1}'
cat test1.txt | wc -l

Share

Spring Security之用户名+密码登录

推荐阅读