vasttrain.blogg.se

Grep linux command examples
Grep linux command examples












grep linux command examples
  1. #Grep linux command examples how to#
  2. #Grep linux command examples code#
  3. #Grep linux command examples download#

No doubt I should examine that file in greater details later. Otherwise, I would have missed the require('./module/nashorn') statement. Indeed, case insensitivity was useful here. Npm/test/nashorn.js:nashornModule.nashornRun('jdk1.8.0') Npm/test/nashorn.js:const nashornModule = require('./module/nashorn') npm/test/ directory mentioning explicitly Nashorn.Ī case-insensitive search ( -i option) is probably better here since I need to find both references to nashorn and Nashorn (or any other combination of upper- and lower-case characters): :~$ grep -i nashorn npm/test/*.js Now, I want to have a closer look at the files from the. So, let’s investigate that a little bit more. Yes, apparently there was some Nashorn-specific tests. "test": "node npm/test/builder.js & node npm/test/unsupported-features.js & node npm/test/jasmine-browser.js & node npm/test/jasmine-browser-min.js & node npm/test/jasmine-node.js & node npm/test/jasmine-webpack.js & npm run test:karmaBrowserify & npm run test:karmaRequirejs & node npm/test/nashorn.js", I do not know Nashorn, so I could take that opportunity to learn more about it by exploring the project parts referencing that JavaScript engine.Īs a starting point, I checked if there were some settings related to Nashorn in the package.json file describing the project dependencies: :~$ grep nashorn package.json Find all occurrences of a string (basic usage)Īsciidoctor.js is supporting the Nashorn JavaScript engine for the Java platform. That will ensure you obtain results perfectly identical to those described in the rest of this article: git clone

#Grep linux command examples download#

You can download that source tree from GitHub, and if you want, you may even check out the same changeset I used when writing this article. So, I will use the Asciidoctor.js source tree to illustrate some of the grep capabilities. It is always better to have real-world examples to learn how things work. However, don’t be fooled by such humble definition: grep is one of the most useful tools in the Unix toolbox and there are countless occasions to use it as soon as you work with text files. If you look into the man, you will see that short description for the grep tool: “print lines matching a pattern.” Real-life useful examples of the grep commands in Linux

#Grep linux command examples how to#

I am going to share with you how to use grep command in Linux with examples.

#Grep linux command examples code#

But my secret weapon to find my way through so many code lines is the grep tool. It is not always easy to be immediately effective when you dig for the first time into a codebase containing several thousand of lines.

grep linux command examples

Recently, I started working with Asciidoctor.js and on the Asciidoctor.js-pug and Asciidoctor-templates.js project.














Grep linux command examples