开发者

Whats wrong with this one line bash script?

开发者 https://www.devze.com 2023-01-19 09:29 出处:网络
Major bash-noob here. Writing my second program again. For my homework, I need to write a number of grep statements u开发者_Python百科sing regexps.

Major bash-noob here. Writing my second program again. For my homework, I need to write a number of grep statements u开发者_Python百科sing regexps.

This is the first one I'm trying to write. I'm saving it as grep.bash:

#!/bin/bash
egrep bright_side_of_life 'the'

The error I get is :

egrep: the: no such file or directory


Probably you flipped the arguments of egrep.

First comes the pattern, second the file.

0

精彩评论

暂无评论...
验证码 换一张
取 消