meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
general:computerenvironment:shell_basic_commands [2019/12/01 22:20] rubengeneral:computerenvironment:shell_basic_commands [2020/09/07 18:20] (current) – [If / Else] ingo
Line 19: Line 19:
 Remember to call the file only in the first command given: Remember to call the file only in the first command given:
 cat ejemplo.txt | grep "xxxxx" cat ejemplo.txt | grep "xxxxx"
 +
 +----
 +Tip: You can create this file with:
 +<code>
 +nano ejemplo.txt
 +</code>
 +paste the contents of the ejemplo file into the nano editor and close it using STRG/CMD + X
 +
 +Alternatively you can download the file by clicking on its name and do the exercises in a linux environment on your local computer (for example using mobaXterm on windows, or in the command line on macOS).
 +----
 +
  
 ===== Reading files + counting lines ===== ===== Reading files + counting lines =====
Line 42: Line 53:
 </code> </code>
  
 +----
 +
 +===== Tab completion =====
 +
 +You can auto-complete paths by pressing the tab key once or twice anytime while writing a path. If the auto-completion does not work, there might be something wrong with your path..
 +
 +You can check out [[https://youtu.be/igwD7cL6QOk|this video]] to see how it works.
 ---- ----
  
Line 161: Line 179:
 If a directory does not exist, 'mv' renames the file instead</hidden> If a directory does not exist, 'mv' renames the file instead</hidden>
 <hidden Grep and quotations> <hidden Grep and quotations>
 +Trying to find all ">" symbols in the following file:
 +<file txt important_sequence.fasta>
 +>Important_sequence1
 +AAATTCTCACCCCTCAGAAA
 +>Important_sequence2
 +ACCTCAGAAAAATTCTCACC
 +</file>
 <code> <code>
-echo -e $">Important_sequence\nAAATTCTCACCCCTCAGAAA" > important_sequence.fasta 
-cat important_sequence.fasta 
 grep > important_sequence.fasta grep > important_sequence.fasta
 </code> </code>
Line 273: Line 296:
   * -lt = is lesser than   * -lt = is lesser than
  
-[[general:computerenvironment:tasksetbash|<- Back]]