Introduction
In this project, you will learn how to extract link information from Markdown documents using a Bash script. This is a common task in software development, where developers need to process and extract specific information from text-based documents.
👀 Preview
$ ./getlink.sh labex_lab1.md
course https://labex.io/courses/
🎯 Tasks
In this project, you will learn:
- How to create a Bash script to extract link text and URLs from a Markdown document
- How to use regular expressions and command-line tools like
grep
and paste
to process text data
- How to make a script executable and run it with command-line arguments
🏆 Achievements
After completing this project, you will be able to:
- Develop a Bash script that can extract link information from Markdown documents
- Understand the logic and implementation of the script, including the use of regular expressions and common command-line tools
- Apply the skills learned in this project to other text processing tasks in your software development work
Skills Graph
%%%%{init: {'theme':'neutral'}}%%%%
flowchart RL
linux(("`Linux`")) -.-> linux/BasicFileOperationsGroup(["`Basic File Operations`"])
linux(("`Linux`")) -.-> linux/BasicSystemCommandsGroup(["`Basic System Commands`"])
linux(("`Linux`")) -.-> linux/InputandOutputRedirectionGroup(["`Input and Output Redirection`"])
linux(("`Linux`")) -.-> linux/TextProcessingGroup(["`Text Processing`"])
shell(("`Shell`")) -.-> shell/BasicSyntaxandStructureGroup(["`Basic Syntax and Structure`"])
shell(("`Shell`")) -.-> shell/ControlFlowGroup(["`Control Flow`"])
shell(("`Shell`")) -.-> shell/AdvancedScriptingConceptsGroup(["`Advanced Scripting Concepts`"])
shell(("`Shell`")) -.-> shell/SystemInteractionandConfigurationGroup(["`System Interaction and Configuration`"])
linux(("`Linux`")) -.-> linux/FileandDirectoryManagementGroup(["`File and Directory Management`"])
linux/BasicFileOperationsGroup -.-> linux/cut("`Text Cutting`")
linux/BasicSystemCommandsGroup -.-> linux/echo("`Text Display`")
linux/InputandOutputRedirectionGroup -.-> linux/pipeline("`Data Piping`")
linux/InputandOutputRedirectionGroup -.-> linux/redirect("`I/O Redirecting`")
linux/TextProcessingGroup -.-> linux/grep("`Pattern Searching`")
linux/TextProcessingGroup -.-> linux/awk("`Text Processing`")
linux/TextProcessingGroup -.-> linux/paste("`Line Merging`")
linux/BasicFileOperationsGroup -.-> linux/rm("`File Removing`")
shell/BasicSyntaxandStructureGroup -.-> shell/shebang("`Shebang`")
shell/BasicSyntaxandStructureGroup -.-> shell/comments("`Comments`")
shell/BasicSyntaxandStructureGroup -.-> shell/quoting("`Quoting Mechanisms`")
shell/ControlFlowGroup -.-> shell/cond_expr("`Conditional Expressions`")
shell/AdvancedScriptingConceptsGroup -.-> shell/subshells("`Subshells and Command Groups`")
shell/AdvancedScriptingConceptsGroup -.-> shell/adv_redirection("`Advanced Redirection`")
shell/SystemInteractionandConfigurationGroup -.-> shell/globbing_expansion("`Globbing and Pathname Expansion`")
linux/FileandDirectoryManagementGroup -.-> linux/wildcard("`Wildcard Character`")
subgraph Lab Skills
linux/cut -.-> lab-301471{{"`Extracting Link Information From Text`"}}
linux/echo -.-> lab-301471{{"`Extracting Link Information From Text`"}}
linux/pipeline -.-> lab-301471{{"`Extracting Link Information From Text`"}}
linux/redirect -.-> lab-301471{{"`Extracting Link Information From Text`"}}
linux/grep -.-> lab-301471{{"`Extracting Link Information From Text`"}}
linux/awk -.-> lab-301471{{"`Extracting Link Information From Text`"}}
linux/paste -.-> lab-301471{{"`Extracting Link Information From Text`"}}
linux/rm -.-> lab-301471{{"`Extracting Link Information From Text`"}}
shell/shebang -.-> lab-301471{{"`Extracting Link Information From Text`"}}
shell/comments -.-> lab-301471{{"`Extracting Link Information From Text`"}}
shell/quoting -.-> lab-301471{{"`Extracting Link Information From Text`"}}
shell/cond_expr -.-> lab-301471{{"`Extracting Link Information From Text`"}}
shell/subshells -.-> lab-301471{{"`Extracting Link Information From Text`"}}
shell/adv_redirection -.-> lab-301471{{"`Extracting Link Information From Text`"}}
shell/globbing_expansion -.-> lab-301471{{"`Extracting Link Information From Text`"}}
linux/wildcard -.-> lab-301471{{"`Extracting Link Information From Text`"}}
end