Comments (2)
This sounds like a great idea. Unfortunately it doesn't work.
man cut | grep delimiter
gives the output:
Use delim as the field delimiter character instead of the tab
delimiter character (see the -d option.) Output fields are sepa-
rated by a single occurrence of the field delimiter character.
-s Suppress lines with no field delimiter characters. Unless speci-
fied, lines with no delimiters are passed through unmodified.
Due to the way the man file is formatted, the word "delimiter" appears on the next line after the -d
flag is introduced:
-d delim
Use delim as the field delimiter character instead of the tab
character.
This exercise works better if we use the /
based search option within man cut
, but that doesn't work as a good example of piping.
It also doesn't work if we use "delim" as the search term to grep (man cut | grep "delim"
):
terms of column position or in terms of fields delimited by a special
Use delim as the field delimiter character instead of the tab
delimiter character (see the -d option.) Output fields are sepa-
rated by a single occurrence of the field delimiter character.
-s Suppress lines with no field delimiter characters. Unless speci-
fied, lines with no delimiters are passed through unmodified.
This works: man cut | grep -B1 "delimiter"
, but we're getting a little into the weeds here. . .
So in summary, I think it's a great idea, but it just doesn't play out well in practice. I favor not introducing this new exercise due to the complexity of execution and think it will be more confusing than helpful to learners. I'll leave it to the Maintainers to decide whether to close this issue or incorporate the exercise: @swang8 @smcclatchy @aschuerch
from shell-genomics.
The man cut
output has some specific character, i.e., -^H-d^Hd ^Hd^He_^Hl_^Hi_^Hm, which makes the grep failed to detect the string "delimiter". It might be good not to use this exercise in the episode.
from shell-genomics.
Related Issues (20)
- shell-genomics/02-the-filesystem - hidden directory exercise HOT 1
- Redirection - Adding an example before determining read quality
- Grep output doesn't match what's in the lesson in a way that breaks the example HOT 5
- shell-genomics/05-writing-scripts -incorrect output displayed for $ ls -l bad-reads-script.sh HOT 1
- Episode 6. Addition of a "cut" command to remove line numbers in history HOT 2
- Lesson contribution - instructor checkout - Working with files and directories HOT 1
- A typo in the introduction part HOT 2
- Introducing the Shell - Overview language - local vs remote HOT 1
- Typos in Introducing the Shell lesson, How to access the shell section HOT 1
- Introduction to shell: How to exit the shell HOT 1
- Add a Tip for command line navigation as part of "Naviational Shortcuts" in episode 2 HOT 3
- Transition To Workbench in May HOT 10
- Links need to be fixed in CONTRIBUTING.md
- Legacy Jekyll template `include gh_variables.html` remains in the front page
- Finish bad sequences calculation HOT 1
- Addition of a *bin* or *scripts* directory in episode 6. Project organization HOT 1
- Transfering local to cloud drop-down menu broken HOT 1
- Add discussion of SFTP HOT 1
- Introducing the shell: The order of the commands
- Lacking setup page
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shell-genomics.