I tried grep -v '^$'
in Linux and that didn't work. This file came from a Windows file system.
相关问题
- React Native Inline style for multiple Text in sin
- How to change the first two uppercase characters o
- Is there a way to rotate text around (or inside) a
- Execute C program till Ctrl+C hit in the terminal
- Gulp BrowserSync showing “reloading browsers” in T
相关文章
- 放在input的text下文本一直出现一个/(即使还没输入任何值)是什么情况
- What's the difference between grep -r and -R
- Emacs/xterm color annoyance on Linux
- make GitX open via Terminal for the repo laying at
- Ruby grep with line number
- Rendering plain text through PHP
- Shell Removing Tabs/Spaces
- JSON.parse with newline [duplicate]
I prefer using
egrep
, though in my test with a genuine file with blank line your approach worked fine (though without quotation marks in my test). This worked too:Keep it simple.