DEV Community

Discussion on: Linux's commands and tricks I'm using in my daily job as a developer

Collapse
 
patricnox profile image
PatricNox

Working with drush, the last one is very neat!

I have a concern regarding "Yes". I find it a bad idea to use this since what if you encounter a new tool? Maybe you install something and Yes makes it install, or maybe skip, dependencies that's crucial to have/not have in the project

(Vague example scenario, but you get the point!)

Collapse
 
moopet profile image
Ben Sinclair

A lot of commands take a -y flag too.

If you're particularly concerned about it doing something you don't want, you can use an expect script instead. It's kind of like selenium for the command line.

Collapse
 
patricnox profile image
PatricNox

Yep! I tend to use the y flag.

Collapse
 
mateuszjarzyna profile image
Mateusz Jarzyna

Thanks, PatricNox! I've added little warning in the post

Collapse
 
mateuszjarzyna profile image
Mateusz Jarzyna

Yup, you are right. yes program may do unexpected thing, but sometimes you do know the script very well and you know all the questions.
Maybe I should change the example and add some warning