├── .freeCodeCamp ├── .bashrc └── test │ ├── .cwd │ └── .next_command ├── .gitignore ├── .gitpod.yml ├── .vscode └── settings.json ├── CHANGELOG.md ├── TUTORIAL.md ├── coderoad.yaml └── tutorial.json /.freeCodeCamp/.bashrc: -------------------------------------------------------------------------------- 1 | # ~/.bashrc: executed by bash(1) for non-login shells. 2 | # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) 3 | # for examples 4 | 5 | # If not running interactively, don't do anything 6 | case $- in 7 | *i*) ;; 8 | *) return;; 9 | esac 10 | 11 | # don't put duplicate lines or lines starting with space in the history. 12 | # See bash(1) for more options 13 | # I commented this out 14 | #HISTCONTROL=ignoreboth 15 | 16 | # append to the history file, don't overwrite it 17 | shopt -s histappend 18 | 19 | # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) 20 | HISTSIZE=1000 21 | HISTFILESIZE=2000 22 | 23 | # check the window size after each command and, if necessary, 24 | # update the values of LINES and COLUMNS. 25 | shopt -s checkwinsize 26 | 27 | # If set, the pattern "**" used in a pathname expansion context will 28 | # match all files and zero or more directories and subdirectories. 29 | #shopt -s globstar 30 | 31 | # make less more friendly for non-text input files, see lesspipe(1) 32 | # I commented this out 33 | #[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" 34 | 35 | # set variable identifying the chroot you work in (used in the prompt below) 36 | if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then 37 | debian_chroot=$(cat /etc/debian_chroot) 38 | fi 39 | 40 | # set a fancy prompt (non-color, unless we know we "want" color) 41 | case "$TERM" in 42 | xterm-color|*-256color) color_prompt=yes;; 43 | esac 44 | 45 | # uncomment for a colored prompt, if the terminal has the capability; turned 46 | # off by default to not distract the user: the focus in a terminal window 47 | # should be on the output of commands, not on the prompt 48 | #force_color_prompt=yes 49 | 50 | if [ -n "$force_color_prompt" ]; then 51 | if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then 52 | # We have color support; assume it's compliant with Ecma-48 53 | # (ISO/IEC-6429). (Lack of such support is extremely rare, and such 54 | # a case would tend to support setf rather than setaf.) 55 | color_prompt=yes 56 | else 57 | color_prompt= 58 | fi 59 | fi 60 | 61 | if [ "$color_prompt" = yes ]; then 62 | PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' 63 | else 64 | PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' 65 | fi 66 | unset color_prompt force_color_prompt 67 | 68 | # If this is an xterm set the title to user@host:dir 69 | case "$TERM" in 70 | xterm*|rxvt*) 71 | PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" 72 | ;; 73 | *) 74 | ;; 75 | esac 76 | 77 | # enable color support of ls and also add handy aliases 78 | if [ -x /usr/bin/dircolors ]; then 79 | test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" 80 | alias ls='ls --color=auto' 81 | #alias dir='dir --color=auto' 82 | #alias vdir='vdir --color=auto' 83 | 84 | # I commented these out 85 | # alias grep='grep --color=auto' 86 | # alias fgrep='fgrep --color=auto' 87 | # alias egrep='egrep --color=auto' 88 | fi 89 | 90 | # colored GCC warnings and errors 91 | #export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' 92 | 93 | # some more ls aliases - # I commented these out 94 | # alias ll='ls -alF' 95 | # alias la='ls -A' 96 | # alias l='ls -CF' 97 | 98 | # Add an "alert" alias for long running commands. Use like so: 99 | # sleep 10; alert 100 | # I commented this out 101 | #alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' 102 | 103 | # Alias definitions. 104 | # You may want to put all your additions into a separate file like 105 | # ~/.bash_aliases, instead of adding them here directly. 106 | # See /usr/share/doc/bash-doc/examples in the bash-doc package. 107 | 108 | if [ -f ~/.bash_aliases ]; then 109 | . ~/.bash_aliases 110 | fi 111 | 112 | # enable programmable completion features (you don't need to enable 113 | # this, if it's already enabled in /etc/bash.bashrc and /etc/profile 114 | # sources /etc/bash.bashrc). 115 | if ! shopt -oq posix; then 116 | if [ -f /usr/share/bash-completion/bash_completion ]; then 117 | . /usr/share/bash-completion/bash_completion 118 | elif [ -f /etc/bash_completion ]; then 119 | . /etc/bash_completion 120 | fi 121 | fi 122 | 123 | # I commented this out 124 | #for i in $(ls -A $HOME/.bashrc.d/); do source $HOME/.bashrc.d/$i; done 125 | 126 | # Add RVM to PATH for scripting. Make sure this is the last PATH variable change. 127 | export PATH="$PATH:$HOME/.rvm/bin" 128 | 129 | # stuff I added 130 | PS1='camper: \[\033[01;34m\]/${PWD##*/}\[\033[00m\]\$ ' 131 | HISTFILE=/workspace/.bash_history 132 | PROMPT_COMMAND='echo $PWD >> /workspace/project/.freeCodeCamp/test/.cwd; history -a' 133 | trap 'echo $BASH_COMMAND >> /workspace/project/.freeCodeCamp/test/.next_command' DEBUG -------------------------------------------------------------------------------- /.freeCodeCamp/test/.cwd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freeCodeCamp/learn-advanced-bash-by-building-a-kitty-ipsum-translator/22cb16eb2fdb48e93c92ab74b8c10c6ca81ac6c1/.freeCodeCamp/test/.cwd -------------------------------------------------------------------------------- /.freeCodeCamp/test/.next_command: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freeCodeCamp/learn-advanced-bash-by-building-a-kitty-ipsum-translator/22cb16eb2fdb48e93c92ab74b8c10c6ca81ac6c1/.freeCodeCamp/test/.next_command -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | -------------------------------------------------------------------------------- /.gitpod.yml: -------------------------------------------------------------------------------- 1 | image: gitpod/workspace-node-18:2024-01-24-09-19-42 2 | 3 | workspaceLocation: 'project' 4 | checkoutLocation: 'project' 5 | 6 | tasks: 7 | - before: | 8 | sudo touch /workspace/.bash_history 9 | sudo chmod -R 777 /workspace 10 | sudo cp /workspace/project/.freeCodeCamp/.bashrc ~/.bashrc 11 | 12 | command: | 13 | sudo rm /workspace/project/CHANGELOG.md 14 | sudo rm /workspace/project/coderoad.yaml 15 | sudo rm /workspace/project/tutorial.json 16 | sudo rm /workspace/project/TUTORIAL.md 17 | exit 18 | 19 | vscode: 20 | extensions: 21 | - CodeRoad.coderoad 22 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "breadcrumbs.enabled": false, 3 | "debug.internalConsoleOptions": "neverOpen", 4 | "debug.showInStatusBar": "never", 5 | "editor.acceptSuggestionOnCommitCharacter": false, 6 | "editor.acceptSuggestionOnEnter": "off", 7 | "editor.autoClosingBrackets": "never", 8 | "editor.codeActionsOnSave": { 9 | "source.fixAll": "explicit" 10 | }, 11 | "editor.hover.enabled": false, 12 | "editor.inlineSuggest.enabled": false, 13 | "editor.minimap.enabled": false, 14 | "editor.parameterHints.enabled": false, 15 | "editor.quickSuggestions": { 16 | "other": false, 17 | "comments": false, 18 | "strings": false 19 | }, 20 | "editor.referenceInfos": false, 21 | "editor.snippetSuggestions": "none", 22 | "editor.suggest.statusBar.visible": false, 23 | "editor.suggestOnTriggerCharacters": false, 24 | "editor.tabSize": 2, 25 | "explorer.autoReveal": false, 26 | "explorer.openEditors.visible": 0, 27 | "extensions.autoCheckUpdates": false, 28 | "extensions.ignoreRecommendations": true, 29 | "files.autoSave": "afterDelay", 30 | "files.exclude": { 31 | "**/.git": true, 32 | "**/.svn": true, 33 | "**/.hg": true, 34 | "**/CVS": true, 35 | "**/.DS_Store": true, 36 | ".vscode": true, 37 | ".gitignore": true, 38 | ".freeCodeCamp": true, 39 | "learn-advanced-bash-by-building-a-kitty-ipsum-translator": true, 40 | ".gitpod.Dockerfile": true, 41 | ".gitpod.yml": true, 42 | "CHANGELOG.md": true, 43 | "coderoad.yaml": true, 44 | "tutorial.json": true, 45 | "TUTORIAL.md": true 46 | }, 47 | "html.autoClosingTags": false, 48 | "npm.fetchOnlinePackageInfo": false, 49 | "task.slowProviderWarning": false, 50 | "terminal.integrated.allowChords": false, 51 | "terminal.integrated.commandsToSkipShell": ["coderoad.enter"], 52 | "terminal.integrated.enableFileLinks": false, 53 | "terminal.integrated.environmentChangesIndicator": "off", 54 | "terminal.integrated.macOptionIsMeta": true, 55 | "terminal.integrated.showExitAlert": false, 56 | "telemetry.enableTelemetry": false, 57 | "update.mode": "none", 58 | "update.showReleaseNotes": false, 59 | "workbench.enableExperiments": false, 60 | "workbench.startupEditor": "none", 61 | "workbench.colorTheme": "Tomorrow Night Blue", 62 | "workbench.colorCustomizations": { 63 | "[Tomorrow Night Blue]": { 64 | "menu.background": "#0a0a23", 65 | "menu.foreground": "#ffffff", 66 | "activityBar.background": "#0a0a23", 67 | "activityBar.foreground": "#ffffff", 68 | "activityBar.activeBorder": "#ffffff", 69 | "activityBar.border": "#2a2a40", 70 | "editorWidget.background": "#0a0a23", 71 | "editorWidget.foreground": "#ffffff", 72 | "sideBar.background": "#1b1b32", 73 | "sideBarTitle.foreground": "#858591", 74 | "sideBar.foreground": "#f5f6f7", 75 | "sideBar.border": "#2a2a40", 76 | "editor.background": "#2a2a40", 77 | "editor.foreground": "#dfdfe2", 78 | "tab.activeForeground": "#ffffff", 79 | "tab.inactiveBackground": "#1b1b32", 80 | "tab.inactiveForeground": "#d0d0d5", 81 | "tab.border": "#2a2a40", 82 | "editorGroupHeader.tabsBackground": "#0a0a23", 83 | "editorIndentGuide.background": "#3b3b4f", 84 | "terminal.background": "#0a0a23", 85 | "terminal.foreground": "#ffffff", 86 | "terminal.ansiBrightGreen": "#ffffff", 87 | "panel.background": "#1b1b32", 88 | "panelTitle.inactiveForeground": "#858591", 89 | "panelTitle.activeBorder": "#f5f6f7" 90 | } 91 | }, 92 | "workbench.iconTheme": null, 93 | "workbench.statusBar.visible": false, 94 | "workbench.tips.enabled": false, 95 | "workbench.tree.renderIndentGuides": "none", 96 | "zenMode.centerLayout": false 97 | } -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## Contributing 2 | 3 | Please read the guidelines in the [contributing docs](https://contribute.freecodecamp.org/#/how-to-work-on-tutorials-that-use-coderoad) before contributing. Contributions to this project need to follow the correct workflow. 4 | 5 | # Change Log 6 | 7 | Whenever a new version is created, add the new branch name and the changes here 8 | 9 | ## [v1.0.0] 10 | 11 | - Initial soft release with news article 12 | 13 | ## [v1.0.1] 14 | 15 | - Move setup commands from `coderoad.yaml` to `setup.sh` 16 | - Add creation of `.bash_history` in setup commands so CodeRoad watchers recognize it when the first command is entered 17 | 18 | ## [v1.0.2] 19 | 20 | - Restructure commits to use new style. Instead of loading a new test file, and commenting out the old one on each commit, this loads all the tests in the `INIT` commit and uses mocha settings to only run tests in a specific file. The commits now just change the test file that should run. 21 | - There was an issue with the last commit not loading after using the reset button in a tutorial. I added a final commit at end that seems to have resolved it. 22 | - Add `exit` flag to mocha so tests can't hang 23 | - Fix typos and syntax in many hints 24 | 25 | ## [v2.0.0] 26 | 27 | - Add Gitpod config 28 | -------------------------------------------------------------------------------- /TUTORIAL.md: -------------------------------------------------------------------------------- 1 | # Learn Advanced Bash by Building a Kitty Ipsum Translator 2 | 3 | > Welcome to the Advanced Bash lessons! 4 | 5 | ## 10. Start the Terminal 6 | 7 | ### 10.1 8 | 9 | **The first thing you need to do is start the terminal.** Do that by clicking the "hamburger" menu at the top left of the screen, going to the "terminal" section, and clicking "new terminal". Once you open a new one, type `echo hello bash` into the terminal and press enter. 10 | 11 | #### HINTS 12 | 13 | - Capitalization matters 14 | - If the tests don't run automatically, try typing `exit` into the terminal and redoing the instructions 15 | 16 | ## 20. echo hello bash > stdout.txt 17 | 18 | ### 20.1 19 | 20 | The command you just entered printed to the terminal. You can `redirect` that output to a file using `>`. Here’s an example: ` > `. Enter the same command but redirect the output into `stdout.txt`. 21 | 22 | #### HINTS 23 | 24 | - The last command was `echo hello bash` 25 | - Enter `echo hello bash > stdout.txt` in the terminal 26 | 27 | ## 30. echo hello bash >> stdout.txt 28 | 29 | ### 30.1 30 | 31 | A `stdout.txt` file was created. You should take a look at it. Instead of printing `hello bash` to the terminal, it **redirected** the output to the file. A single `>` will create or overwrite the file. Use the same command with `>>` to append to the file. 32 | 33 | #### HINTS 34 | 35 | - Here's an example: ` >> ` 36 | - You want to append the output of `echo hello bash` to `stdout.txt` 37 | - The last command was `echo hello bash > stdout.txt` 38 | - Enter `echo hello bash >> stdout.txt` in the terminal 39 | 40 | ## 40. echo hello bash > stdout.txt 41 | 42 | ### 40.1 43 | 44 | Take a look at the file again. The output of `echo hello bash` was added to it. Use the command with one `>` again to overwrite the file. 45 | 46 | #### HINTS 47 | 48 | - Here's an example: ` > ` 49 | - Use `>` to redirect the output of `echo hello bash` to `stdout.txt` so it overwrites the file 50 | - The last command was `echo hello bash >> stdout.txt` 51 | - Enter `echo hello bash > stdout.txt` in the terminal 52 | 53 | ## 50. > stdout.txt 54 | 55 | ### 50.1 56 | 57 | Take a look at the file. It was overwritten with the output of the command. Enter `> stdout.txt` in the terminal to redirect nothing into the file. Effectively, emptying it. 58 | 59 | #### HINTS 60 | 61 | - Enter `> stdout.txt` in the terminal 62 | 63 | ## 60. bad_command 64 | 65 | ### 60.1 66 | 67 | Next, enter `bad_command` in the terminal to see what happens. You will get an error. 68 | 69 | #### HINTS 70 | 71 | - Enter `bad_command` in the terminal 72 | 73 | ## 70. bad_command > stderr.txt 74 | 75 | ### 70.1 76 | 77 | Enter the same command, but try to redirect the output to `stderr.txt` using `>`. 78 | 79 | #### HINTS 80 | 81 | - Here's an example: ` > ` 82 | - Make sure to use `stderr.txt` as the filename 83 | - Enter `bad_command > stderr.txt` in the terminal 84 | 85 | ## 80. bad_command 2> stderr.txt 86 | 87 | ### 80.1 88 | 89 | There’s two types of output, `stdout` (standard out) for when a command is successful, and `stderr` (standard error) for when it’s not. Both of these will print to the terminal by default. `bad_command` was not a valid command, so it printed to `stderr`. You can redirect `stderr` with `2>`. Enter the same command but redirect `stderr` to `stderr.txt` 90 | 91 | #### HINTS 92 | 93 | - Here's an example: ` 2> ` 94 | - Make sure to use `stderr.txt` as the filename 95 | - Enter `bad_command 2> stderr.txt` in the terminal 96 | 97 | ## 90. echo hello bash 1> stdout.txt 98 | 99 | ### 90.1 100 | 101 | Take a look at the `stderr.txt` file. The error was redirected to the file and nothing printed in the terminal. You used `2>` to redirect `stderr`. Similarily, you can use `1>` to redirect `stdout`. Enter `echo hello bash` again and use it to redirect `stdout` to the `stdout.txt` file. 102 | 103 | #### HINTS 104 | 105 | - Make sure to use `1>` to redirect `stdout` 106 | - Make sure it's redirected to `stdout.txt` 107 | - Enter `echo hello bash 1> stdout.txt` in the terminal 108 | 109 | ## 100. read NAME 110 | 111 | ### 100.1 112 | 113 | `stdout` and `stderr` are for output. `stdin` (standard in) is the third thing commands can use and is for getting input. The default is the keyboard. Enter `read NAME` in the terminal to see a command that uses `stdin`. 114 | 115 | #### HINTS 116 | 117 | - Enter `read NAME` in the terminal 118 | 119 | ## 110. Enter your name 120 | 121 | ### 110.1 122 | 123 | The `read` command is looking at `stdin` for where to get input, which is pointing to the keyboard. Type your name and press enter. 124 | 125 | #### HINTS 126 | 127 | - The last command should be `read NAME` 128 | - If the tests don't pass, enter `read NAME` in the terminal, type your name and press enter 129 | 130 | ## 115. echo $NAME 131 | 132 | ### 115.1 133 | 134 | Use `echo` to print the variable you just created. 135 | 136 | #### HINTS 137 | 138 | - Here's an example: `echo ` 139 | - You can use a variable like this: `$` 140 | - Enter `echo $NAME` in the terminal 141 | 142 | ## 120. echo $NAME > stdout.txt 143 | 144 | ### 120.1 145 | 146 | Use `echo` to print the `NAME` variable again, but redirect the `stdout` to `stdout.txt` so it overwrites the file. 147 | 148 | #### HINTS 149 | 150 | - Here's an example: ` > ` 151 | - Make sure to use `stdout.txt` as the filename 152 | - Enter `echo $NAME > stdout.txt` in the terminal 153 | 154 | ## 140. echo freeCodeCamp > name.txt 155 | 156 | ### 140.1 157 | 158 | Use `echo` and *redirection* to put the text `freeCodeCamp` in a `name.txt` file for some more testing. Remember that it will create the file if it doesn't exist. 159 | 160 | #### HINTS 161 | 162 | - Here's an example: `echo > ` 163 | - Use `freeCodeCamp` as the text and `name.txt` as the filename 164 | - Enter `echo freeCodeCamp > name.txt` in the terminal 165 | - Make sure `freeCodeCamp` is the only text in the file 166 | 167 | ## 150. read NAME < name.txt 168 | 169 | ### 150.1 170 | 171 | Just like you can redirect output, you can redirect `stdin` as well. Here's an example: ` < `. Use the `read` command to assign the `NAME` variable to the contents of `name.txt` by redirecting the `stdin`. 172 | 173 | #### HINTS 174 | 175 | - You want to use `read NAME` as the command and `name.txt` as the input 176 | - Enter `read NAME < name.txt` in the terminal 177 | 178 | ## 160. echo $NAME 179 | 180 | ### 160.1 181 | 182 | `stdin` was pointing to the `name.txt` file this time. Use `echo` to print the `NAME` variable again. 183 | 184 | #### HINTS 185 | 186 | - Here's an example: `echo ` 187 | - You can use a variable like this: `$` 188 | - Enter `echo $NAME` in the terminal 189 | 190 | ## 170. echo your_name | read NAME 191 | 192 | ### 170.1 193 | 194 | Now the variable is set to the content of the file, which was the input. Another way to set the `stdin` is by using the pipe (`|`). It will use the output from one command as input for another. Here's an example: ` | `. This will take the `stdout` from `command_1` and use it as the `stdin` for `command_2`. Use this method to **echo** your name and pipe the output into the `read` command which reads your name into the `NAME` variable. 195 | 196 | #### HINTS 197 | 198 | - Enter `echo | read NAME` 199 | - Replace `` with your name 200 | 201 | ## 175. echo $NAME 202 | 203 | ### 175.1 204 | 205 | Use echo to print the variable again. 206 | 207 | #### HINTS 208 | 209 | - Here's an example: `echo ` 210 | - You can use a variable like this: `$` 211 | - Enter `echo $NAME` in the terminal 212 | 213 | ## 178. cat 214 | 215 | ### 178.1 216 | 217 | It worked, but it doesn't look like it. When you used the pipe (`|`) to set the input for `read`, it ran the command in a subshell or subprocess. Basically, another terminal instance within the one you see. The variable was set in there and didn't affect the one you had previously set. `cat` is another command that takes input. Enter it in the terminal. 218 | 219 | #### HINTS 220 | 221 | - Enter `cat` in the terminal 222 | 223 | ## 180. end cat 224 | 225 | ### 180.1 226 | 227 | `cat` will print the contents of a file or input to `stdout`. You didn't specify any input for the command. Feel free to type something and press enter. When you are done, press `control+c` to finish the command. 228 | 229 | #### HINTS 230 | 231 | - `cat` should be the last command entered 232 | - Close the command with `control+c` 233 | 234 | ## 185. cat name.txt 235 | 236 | ### 185.1 237 | 238 | `cat` can take a filename as an argument. Use it again with your `name.txt` file as an arguement to print the contents of the file. 239 | 240 | #### HINTS 241 | 242 | - Here's an example: `cat ` 243 | - Use the `name.txt` file 244 | - Enter `cat name.txt` in the terminal 245 | 246 | ## 190. cat < name.txt 247 | 248 | ### 190.1 249 | 250 | Enter the same command but use redirection to set the `stdin` to `name.txt` 251 | 252 | #### HINTS 253 | 254 | - Use `<` to redirect input 255 | - Here's an example ` < ` 256 | - It was the `cat` command with the `name.txt` file 257 | - Enter `cat < name.txt` in the terminal 258 | 259 | ## 200. echo your_name | cat 260 | 261 | ### 200.1 262 | 263 | Use `echo` to print your name and pipe the output into the `cat` command. 264 | 265 | #### HINTS 266 | 267 | - Here's an example: ` | ` 268 | - The first command should be `echo ` 269 | - The second is `cat` 270 | - Enter `echo | cat` in the terminal 271 | - Replace `` with your name 272 | 273 | ## 210. touch script.sh 274 | 275 | ### 210.1 276 | 277 | You should be starting to get the hang of how `stdin`, `stdout`, and `stderr` work but let's try another example with your own command. Use `touch` to create a file named `script.sh`. 278 | 279 | #### HINTS 280 | 281 | - Here's an example: `touch ` 282 | - Enter `touch script.sh` in the terminal 283 | - Make sure you are in the `project` folder first 284 | 285 | ## 220. chmod +x script.sh 286 | 287 | ### 220.1 288 | 289 | Give your new script executable permissions with the `chmod` command and the `+x` flag. 290 | 291 | #### HINTS 292 | 293 | - Here's an example: `chmod +x ` 294 | - Enter `chmod +x script.sh` in the terminal 295 | 296 | ## 230. Add shebang 297 | 298 | ### 230.1 299 | 300 | This will be a very simple script with only a few commands. At the top of file, add a shebang that looks like this: `#!/bin/bash`. 301 | 302 | #### HINTS 303 | 304 | - Add the suggestion at the top of the `script.sh` file 305 | - Add `#!/bin/bash` at the top of the `script.sh` file 306 | 307 | ## 240. Add read NAME 308 | 309 | ### 240.1 310 | 311 | Below the shebang, add a `read` command that reads input into a `NAME` variable. 312 | 313 | #### HINTS 314 | 315 | - Add the suggestion to the bottom of the `script.sh` file 316 | - Add `read NAME` to the bottom of the `script.sh` file 317 | 318 | ## 250. Add echo Hello $NAME 319 | 320 | ### 250.1 321 | 322 | Below that, use `echo` to print `Hello ` using the variable. 323 | 324 | #### HINTS 325 | 326 | - Add the suggestion to the bottom of the `script.sh` file 327 | - Here's an example: `echo Hello ` 328 | - You can use a variable like this: `$` 329 | - Use the `NAME` variable 330 | - Add `echo Hello $NAME` to the bottom of the `script.sh` file 331 | 332 | ## 260. Add bad_command 333 | 334 | ### 260.1 335 | 336 | One more thing. Add `bad_command` at the bottom of the file. 337 | 338 | #### HINTS 339 | 340 | - Add the suggestion to the bottom of the `script.sh` file 341 | - Add `bad_command` to the bottom of the `script.sh` file 342 | 343 | ## 264. ./script.sh 344 | 345 | ### 264.1 346 | 347 | Your script takes input from `stdin` and will output to `stdout` and `stderr`. Run your script and don't input anything for now. 348 | 349 | #### HINTS 350 | 351 | - Here's how you can run a script: `./` 352 | - Enter `./script.sh` in the terminal 353 | 354 | ## 266. end ./script.sh 355 | 356 | ### 266.1 357 | 358 | The `read` command in your script is waiting for input. Type your name and press enter. 359 | 360 | #### HINTS 361 | 362 | - The last command should be `./script.sh` 363 | - Run `./script.sh` in the terminal and enter input when it is waiting 364 | 365 | ## 270. echo your_name | ./script 366 | 367 | ### 270.1 368 | 369 | You input your name, and your script output the result of the two commands. Run the script again, but use a pipe to echo your name as the input. 370 | 371 | #### HINTS 372 | 373 | - Here's an example: ` | ` 374 | - Use `echo ` as the first command 375 | - And `./script.sh` as the second 376 | - Enter `echo | ./script.sh` in the terminal 377 | - Replace `` with your name 378 | 379 | ## 280. echo your_name | ./script 2> stderr 380 | 381 | ### 280.1 382 | 383 | It didn't ask for input this time because you gave it input with the pipe. The two types of output were printed in the terminal. Run the same command but redirect `stderr` output to the `stderr.txt` 384 | 385 | #### HINTS 386 | 387 | - The previous command was `echo | ./script.sh` 388 | - You can redirect `sterr` output with `2>` 389 | - Here's an example: ` 2> ` 390 | - Enter `echo | ./script.sh 2> stderr.txt` 391 | 392 | ## 290. echo your_name | ./script 2> stderr 1> stdout 393 | 394 | ### 290.1 395 | 396 | Again, it didn't ask for input. This time it only printed your name to the terminal and not the output of `bad_command`. That produced an error, which you redirected to `stderr.txt`. Take a look at that file. You can redirect both the `stderr` and `stdout` by adding another redirection at the end like this: `> `. Enter the same command, redirect the `stderr` to the same place again, and the `stdout` to `stdout.txt`. 397 | 398 | #### HINTS 399 | 400 | - Here's another example: ` 2> > ` 401 | - The previous command was `echo | ./script.sh 2> stderr.txt` 402 | - Add `> stdout.txt` to the end of the previous command 403 | - Enter `echo | ./script.sh 2> stderr.txt > stdout.txt` in the terminal 404 | 405 | ## 300. ./script < name 406 | 407 | ### 300.1 408 | 409 | It didn't ask for input and nothing was printed in the terminal that time. You redirected both outputs to files. You should take a look at them to see if they have what you expected. Run your script again, use redirection to set `name.txt` as the input. Don't redirect any of the output. 410 | 411 | #### HINTS 412 | 413 | - You should have a `name.txt` file with only the text `freeCodeCamp` in it 414 | - Here's an example: ` < ` 415 | - Enter `./script.sh < name.txt` in the terminal 416 | 417 | ## 310. ./script < name 2> stderr 418 | 419 | ### 310.1 420 | 421 | Excellent. Run the same command, but redirect the `stderr` to `stderr.txt`. 422 | 423 | #### HINTS 424 | 425 | - The previous command was `./script.sh < name.txt` 426 | - You can redirect `sterr` output with `2>` 427 | - Here's an example: ` 2> ` 428 | - Enter `./script.sh < name.txt 2> stderr.txt` 429 | 430 | ## 320. ./script < name 2> stderr 1> stdout 431 | 432 | ### 320.1 433 | 434 | Nice job! Run it again, redirect the `stderr` to the same place and the `stdout` to `stdout.txt` 435 | 436 | #### HINTS 437 | 438 | - You can redirect `stdout` with `>` 439 | - Here's an example: ` 2> > ` 440 | - The previous command was `./script.sh < name.txt 2> stderr.txt` 441 | - Add `> stdout.txt` to the end of the previous command 442 | - Enter `./script.sh < name.txt 2> stderr.txt > stdout.txt` in the terminal 443 | 444 | ## 324. cat kitty_ipsum_1.txt 445 | 446 | ### 324.1 447 | 448 | :smile: You have two `kitty_ipsum` files. Find out what's in them by printing the first one in the terminal with `cat`. 449 | 450 | #### HINTS 451 | 452 | - Here's an example: `cat ` 453 | - It's the `kitty_ipsum_1.txt` file 454 | - Enter `cat kitty_ipsum_1.txt` in the terminal 455 | 456 | ## 326. cat kitty_ipsum_2.txt 457 | 458 | ### 326.1 459 | 460 | It's some kitty ipsum. You may enjoy reading it :smile: Look at the second one with `cat` like you did this one. 461 | 462 | #### HINTS 463 | 464 | - Here's an example: `cat ` 465 | - It's the `kitty_ipsum_2.txt` file 466 | - Enter `cat kitty_ipsum_2.txt` in the terminal 467 | 468 | ## 330. wc kitty_ipsum_1 469 | 470 | ### 330.1 471 | 472 | You will write a small script to translate both of them into doggy ipsum. For now, you will learn some commands to figure out how. The first one is `wc`. It prints some info about a file. It can take a file as an argument like the `cat` command. Use it to see what it shows you about your `kitty_ipsum_1.txt` file. 473 | 474 | #### HINTS 475 | 476 | - Here's an example: `wc ` 477 | - Enter `wc kitty_ipsum_1.txt` in the terminal 478 | 479 | ## 340. man wc 480 | 481 | ### 340.1 482 | 483 | Not quite sure what all those numbers mean. Check the manual of the `wc` command to see if you can find out more. 484 | 485 | #### HINTS 486 | 487 | - View the manual of a command with `man` 488 | - Here's an example: `man ` 489 | - Enter `man wc` in the terminal 490 | - Press enter until you have seen the whole manual 491 | 492 | ## 350. wc -l kitty_ipsum_1 493 | 494 | ### 350.1 495 | 496 | `wc` stands for `word count`. It showed you how many lines were in the file, how many words, and how many bytes. Use the `-l` flag to only output how many lines are in the file. Don't do any redirecting of input or output. 497 | 498 | #### HINTS 499 | 500 | - Here's an example ` ` 501 | - Enter `wc -l kitty_ipsum_1.txt` in the terminal 502 | 503 | ## 360. wc -w kitty_ipsum_1 504 | 505 | ### 360.1 506 | 507 | The file has 27 lines. Check how many words are in the file. 508 | 509 | #### HINTS 510 | 511 | - Don't use any redirection 512 | - Check the manual with `man wc` to find the flag you need 513 | - It's the `-w` flag 514 | - Enter `wc -w kitty_ipsum_1.txt` in the terminal 515 | 516 | ## 370. wc -m kitty_ipsum_1 517 | 518 | ### 370.1 519 | 520 | 332 words are in the `kitty_ipsum_1.txt` file. Lastly, check how many characters it has. 521 | 522 | #### HINTS 523 | 524 | - Don't use any redirection 525 | - Check the manual with `man wc` to find the flag you need 526 | - It's the `-m` flag 527 | - Enter `wc -m kitty_ipsum_1.txt` in the terminal 528 | 529 | ## 380. wc kitty_ipsum_1 530 | 531 | ### 380.1 532 | 533 | Use the command without any flags to see if the numbers are the same. 534 | 535 | #### HINTS 536 | 537 | - Don't use any redirection 538 | - Enter `wc kitty_ipsum_1.txt` in the terminal 539 | 540 | ## 390. cat kitty_ipsum_1 | wc 541 | 542 | ### 390.1 543 | 544 | That shows the byte count instead of the character count. Some characters must be more than one byte. Use `cat` to pipe the content of the file as the input of the `wc` command to see if the output is the same. 545 | 546 | #### HINTS 547 | 548 | - Here's an example: ` | ` 549 | - The first command should be `cat kitty_ipsum_1.txt` 550 | - The second is `wc` 551 | - Enter `cat kitty_ipsum_1.txt | wc` in the terminal 552 | 553 | ## 400. wc < kitty_ipsum_1 554 | 555 | ### 400.1 556 | 557 | It looks like the way you give input to a command may affect the output. It only printed the numbers that time and not the filename. Try using redirection as the input with the same file and command to see what that outputs. 558 | 559 | #### HINTS 560 | 561 | - You can redirect input with `<` 562 | - Here's an example: ` < ` 563 | - Enter `wc < kitty_ipsum_1.txt` in the terminal 564 | 565 | ## 420. echo ~~ kitty_ipsum_1.txt info ~~ > kitty_info 566 | 567 | ### 420.1 568 | 569 | No filename again with fewer spaces that time. You may have to play with certain commands to get the output you are looking for. You are going to create a file that has some meta information about the two kitty ipsum files in it. Use `echo` and redirection to print `~~ kitty_ipsum_1.txt info ~~` to a file named `kitty_info.txt`. Make sure to place the text in quotes. 570 | 571 | #### HINTS 572 | 573 | - Remember that redirecting output will create the file if it doesn't exist 574 | - You can redirect output with `>` 575 | - Here's an example: ` > ` 576 | - Enter `echo "~~ kitty_ipsum_1.txt info ~~" > kitty_info.txt` in the terminal 577 | - Make sure to use quotes around the text 578 | 579 | ## 430. echo Number of lines >> kitty_info 580 | 581 | ### 430.1 582 | 583 | Open the file so you can keep track of what's in it. Use `echo` and the `-e` flag with the new line character (`\n`) to **append** `Number of lines:` to the `kitty_info.txt` file. Add the new line character at the beginning of the text so there's an empty line. Remember that you can append output to a file with `>>`. 584 | 585 | #### HINTS 586 | 587 | - Here's an example: ` >> ` 588 | - The command you want is `echo -e "\nNumber of lines:"` 589 | - Enter `echo -e "\nNumber of lines:" >> kitty_info.txt` 590 | 591 | ## 440. cat kitty_ipsum_1 | wc -l >> kitty_info 592 | 593 | ### 440.1 594 | 595 | You should be able to find out how many lines are in the `kitty_ipsum_1.txt` file and add that number to the `kitty_info.txt` file. Use the `cat` command to pipe the content of `kitty_ipsum_1.txt` as input for the `wc` command. Use the flag for getting the number of lines from that input and **append** the number to the `kitty_info.txt` file. **Tip:** enter the command without appending to see if it's working first. 596 | 597 | #### HINTS 598 | 599 | - Here's an example: `cat | wc >> ` 600 | - The flag you want is `-l` 601 | - You previously used `cat kitty_ipsum_1.txt | wc` 602 | - Enter `cat kitty_ipsum_1.txt | wc -l >> kitty_info.txt` in the terminal 603 | 604 | ## 450. echo -e Number of words: >> kitty_info 605 | 606 | ### 450.1 607 | 608 | Next, you want to put a word count of the file in the info. Use `echo` again to append `Number of words:` to `kitty_info.txt`. Put a new line in front of the text like you did for the first one. 609 | 610 | #### HINTS 611 | 612 | - Here's an example: ` >> ` 613 | - You want the `echo` command with the `-e` flag and the new line character (`\n`) 614 | - You previously entered `echo -e "\nNumber of lines:" >> kitty_info.txt` 615 | - Enter `echo -e "\nNumber of words:" >> kitty_info.txt` in the terminal 616 | 617 | ## 460. cat kitty_ipsum_1 | wc -w >> kitty_info 618 | 619 | ### 460.1 620 | 621 | Use `cat` and the pipe method again to append the number of words in `kitty_ipsum_1.txt` to `kitty_info.txt`. 622 | 623 | #### HINTS 624 | 625 | - Here's an example: `cat | wc >> ` 626 | - The flag you want is `-w` 627 | - You previously used `cat kitty_ipsum_1.txt | wc -l >> kitty_info.txt` 628 | - Enter `cat kitty_ipsum_1.txt | wc -w >> kitty_info.txt` in the terminal 629 | 630 | ## 470. echo -e Number of characters: >> kitty_info 631 | 632 | ### 470.1 633 | 634 | Next, you want to add the number of characters. Use the `echo` command with redirection to append `Number of characters:`, with a new line in front of it, to `kitty_info.txt` like you did with the other sentences. 635 | 636 | #### HINTS 637 | 638 | - Here's an example: ` >> ` 639 | - You want the `echo` command with the `-e` flag and the new line character (`\n`) 640 | - You previously entered `echo -e "\nNumber of words:" >> kitty_info.txt` 641 | - Enter `echo -e "\nNumber of characters:" >> kitty_info.txt` in the terminal 642 | 643 | ## 480. wc -m < kitty_ipsum_1 >> kitty_info 644 | 645 | ### 480.1 646 | 647 | Append the number of characters in `kitty_ipsum_1.txt` to `kitty_info.txt`. Use the redirection method as the input for the `wc` command this time instead of the piping method. 648 | 649 | #### HINTS 650 | 651 | - You can redirect input with `<` 652 | - Here's an example: ` < >> ` 653 | - Use the `-m` flag with the `wc` command to find the number of characters in a file 654 | - You previously used `wc < kitty_ipsum_1.txt` 655 | - Enter `wc -m < kitty_ipsum_1.txt >> kitty_info.txt` 656 | 657 | ## 490. grep meow kitty_ipsum_1 658 | 659 | ### 490.1 660 | 661 | `grep` is a command for searching for patterns in text. You can use it like this: `grep '' `. Use it to search for the pattern `meow` in the `kitty_ipsum_1.txt` file. 662 | 663 | #### HINTS 664 | 665 | - Enter `grep 'meow' kitty_ipsum_1.txt` in the terminal 666 | 667 | ## 500. man grep 668 | 669 | ### 500.1 670 | 671 | It showed you all the lines that contain `meow` somewhere in them, but it’s a little messy. View the manual of `grep` to see if you can find anything to help. 672 | 673 | #### HINTS 674 | 675 | - View a man with `man ` 676 | - Enter `man grep` in the terminal 677 | - Press enter until you have seen the whole manual 678 | 679 | ## 510. grep --color meow kitty_ipsum_1 680 | 681 | ### 510.1 682 | 683 | That's a lot of options. Use `grep` to search for the `meow` pattern in the same file, but add that `--color` flag to see if it's a little more helpful. 684 | 685 | #### HINTS 686 | 687 | - Here's an example: `grep '' ` 688 | - You previously entered `grep 'meow' kitty_ipsum_1.txt` 689 | - Enter `grep --color 'meow' kitty_ipsum_1.txt` in the terminal 690 | 691 | ## 520. grep --color -n cat kitty_ipsum_1 692 | 693 | ### 520.1 694 | 695 | That’s better. Add the flag to show all the line numbers with the command. 696 | 697 | #### HINTS 698 | 699 | - View the manual `man grep` to find the flag you need 700 | - It's the `-n` flag 701 | - The last command was `grep --color 'meow' kitty_ipsum_1.txt` 702 | - Enter `grep --color -n 'meow' kitty_ipsum_1.txt` in the terminal 703 | 704 | ## 530. grep --color -n meow[a-z] kitty_ipsum_1 705 | 706 | ### 530.1 707 | 708 | It's showing the line number of each match it found. `grep` can use regular expressions, too. Enter the previous command, but change the pattern to `meow[a-z]*` to see all words that start with `meow`. 709 | 710 | #### HINTS 711 | 712 | - The last command was `grep --color -n 'meow' kitty_ipsum_1.txt` 713 | - Enter `grep --color -n 'meow[a-z]*' kitty_ipsum_1.txt` in the terminal 714 | 715 | ## 540. echo -e \nNumber of times meow or meowzer appears: >> kitty_info 716 | 717 | ### 540.1 718 | 719 | Looking at the output, you can see that it matched `meow` and `meowzer`, instead of just `meow`. Use the `echo` command and redirection to append the text `Number of times meow or meowzer appears:`, with a new line in front of it, to the `kitty_info.txt` file. 720 | 721 | #### HINTS 722 | 723 | - Here's an example: ` >> ` 724 | - You want the `echo` command with the `-e` flag and the new line character (`\n`) 725 | - You previously entered `echo -e "\nNumber of characters:" >> kitty_info.txt` 726 | - Enter `echo -e "\nNumber of times meow or meowzer appears:" >> kitty_info.txt` in the terminal 727 | 728 | ## 550. grep --color meow[a-z] kitty_ipsum_1 729 | 730 | ### 550.1 731 | 732 | So how can you find how many times those two words appear? Use grep to find the `meow[a-z]*` pattern in the file again to see how many times they appear. Add the `--color` flag to the command. 733 | 734 | #### HINTS 735 | 736 | - Don't use the `-n` flag to show the line numbers. 737 | - Enter `grep --color 'meow[a-z]*' kitty_ipsum_1.txt` in the terminal 738 | 739 | ## 560. grep -c meow[a-z] kittpy_ipsum_1 740 | 741 | ### 560.1 742 | 743 | It looks like seven, but how can you get a count of that from the command line to append to the info file for the next piece of information? `grep` has a `-c` flag to give you a count. Enter the last command but use that instead of the `--color` flag. 744 | 745 | #### HINTS 746 | 747 | - The last command was `grep --color 'meow[a-z]*' kitty_ipsum_1.txt` 748 | - Enter `grep -c 'meow[a-z]*' kitty_ipsum_1.txt` in the terminal 749 | 750 | ## 570. man grep 751 | 752 | ### 570.1 753 | 754 | That gave you a count of the number lines that the pattern occurred on. Check the manual of grep to see if there's a way to find a count of all the words matched. 755 | 756 | #### HINTS 757 | 758 | - View a man with `man ` 759 | - Enter `man grep` in the terminal 760 | - Press enter until you have seen the whole manual 761 | 762 | ## 580. grep -o meow[a-z] kitty_1 763 | 764 | ### 580.1 765 | 766 | It doesn't look like that's an option. But there is a `-o` flag that says it will put the matches on their own lines. Try that one with that command instead of the `-c` flag. 767 | 768 | #### HINTS 769 | 770 | - The previous command was `grep -c 'meow[a-z]*' kitty_ipsum_1.txt` 771 | - Replace the `-c` with `-o` in the previous command 772 | - Enter `grep -o 'meow[a-z]*' kitty_ipsum_1.txt` in the terminal 773 | 774 | ## 590. grep -o meow[a-z] kitty_1 | wc -l 775 | 776 | ### 590.1 777 | 778 | That gave you each match on it's own line. You can use the `wc` command again to get a count of the lines to find out how many matches there are. Pipe the output of the last command into the `wc` command and use the flag for showing the line count. 779 | 780 | #### HINTS 781 | 782 | - The last command was `grep -o 'meow[a-z]*' kitty_ipsum_1.txt` 783 | - Here's an example: ` | ` 784 | - You want to use the `-l` flag with the `wc` command 785 | - Enter `grep -o 'meow[a-z]*' kitty_ipsum_1.txt | wc -l` in the terminal 786 | 787 | ## 600. grep -o meow[a-z] kitty_1 | wc -l >> kitty_info 788 | 789 | ### 600.1 790 | 791 | Awesome. `wc` counted the lines in the output of the `grep`. That should be the count for how many times those words appear. Enter the same command but append the number to the `kitty_info.txt` file. 792 | 793 | #### HINTS 794 | 795 | - The last command was `grep -o 'meow[a-z]*' kitty_ipsum_1.txt | wc -l` 796 | - Append output to a file with `>> ` 797 | - Enter `grep -o 'meow[a-z]*' kitty_ipsum_1.txt | wc -l >> kitty_info.txt` in the terminal 798 | 799 | ## 610. echo -e \nLines that they appear on: >> kitty_info 800 | 801 | ### 610.1 802 | 803 | Append the text `Lines that they appear on:` to the `kitty_info.txt` file. Use the `echo` command with the `-e` flag again and put a new line in front of the text. 804 | 805 | #### HINTS 806 | 807 | - Here's an example: ` >> ` 808 | - You want the `echo` command with the `-e` flag and the new line character (`\n`) 809 | - You previously entered `echo -e "\nNumber of times meow or meowzer appears:" >> kitty_info.txt` 810 | - Enter `echo -e "\nLines that they appear on:" >> kitty_info.txt` in the terminal 811 | 812 | ## 620. grep -n meow[a-z] kitty_ipsum_1 813 | 814 | ### 620.1 815 | 816 | There was a `-n` flag with `grep` to get line numbers. Use it to check the `kitty_ipsum_1.txt` file for the `meow[a-z]*` pattern again. 817 | 818 | #### HINTS 819 | 820 | - Here's an example: `grep '' ` 821 | - Enter `grep -n 'meow[a-z]*' kitty_ipsum_1.txt` in the terminal 822 | 823 | ## 630. man grep 824 | 825 | ### 630.1 826 | 827 | Check the `grep` manual to see if there's a way to get just the line numbers. 828 | 829 | #### HINTS 830 | 831 | - View a man with `man ` 832 | - Enter `man grep` in the terminal 833 | 834 | ## 635. cat name.txt 835 | 836 | ### 635.1 837 | 838 | There doesn't appear to be a way to just get the line numbers. There's a `sed` command for replacing text that might work. First, some practice. Use `cat` to print the `name.txt` file in the terminal. It should still say `freeCodeCamp`. 839 | 840 | #### HINTS 841 | 842 | - Enter `cat name.txt` in the terminal 843 | - The file should only have the text `freeCodeCamp` 844 | 845 | ## 640. sed s/r/2/ name.txt 846 | 847 | ### 640.1 848 | 849 | `sed` can replace text like this: `sed 's///' `. By default, it won't replace the text in the file. It will output it to `stdout`. Use it to replace `r` with `2` in the `name.txt` file and the output prints to the terminal. 850 | 851 | #### HINTS 852 | 853 | - Check the example again 854 | - The pattern is `r`, the replacement text is `2` 855 | - Enter `sed 's/r/2/' name.txt` in the terminal 856 | 857 | ## 650. sed s/free/f233/ name.txt 858 | 859 | ### 650.1 860 | 861 | You can see that it replaced the `r` with a `2` in `freeCodeCamp`. Use it again to replace `free` with `f233` in the same way. 862 | 863 | #### HINTS 864 | 865 | - Here's the example: `sed 's///' ` 866 | - The pattern is `free`, the replacement text is `f233` 867 | - You previously used `sed 's/r/2/' name.txt` 868 | - Enter `sed 's/free/f233/' name.txt` in the terminal 869 | 870 | ## 660. sed s/freecodecamp/f233C0d3C@mp/ name.txt 871 | 872 | ### 660.1 873 | 874 | Try it again, replacing `freecodecamp` with `f233C0d3C@mp`. 875 | 876 | #### HINTS 877 | 878 | - Here's the example: `sed 's///' ` 879 | - The pattern is `freecodecamp`, the replacement text is `f233C0d3C@mp` 880 | - You previously used `sed 's/free/f233/' name.txt` 881 | - Enter `sed 's/freecodecamp/f233C0d3C@mp/' name.txt` in the terminal 882 | 883 | ## 670. sed s/freecodecamp/f233C0d3C@mp/i name.txt 884 | 885 | ### 670.1 886 | 887 | Nothing was replaced that time. It didn't find the `freecodecamp` text you tried to replace because the case of a few letters didn't match. You can add regex flags after the last `/` in the `sed` argument. A `g`, for `global`, would replace all instances of a matched pattern, or an `i` to ignore the case of the pattern. Enter the same command but add the correct regex flag to ignore the case. 888 | 889 | #### HINTS 890 | 891 | - Here's an example: `sed 's///' ` 892 | - The pattern is `freecodecamp`, the replacement text is `f233C0d3C@mp` and the regex flag is `i` 893 | - The last command was `sed 's/freecodecamp/f233C0d3C@mp/' name.txt` 894 | - Enter `sed 's/freecodecamp/f233C0d3C@mp/i' name.txt` in the terminal 895 | 896 | ## 675. sed s/freecodecamp/f233C0d3C@mp/i < name.txt 897 | 898 | ### 675.1 899 | 900 | It worked that time since it wasn't required to match the case. As with any command, the input can be redirected. Use the same `sed` replacement and file but redirect the **input** this time. 901 | 902 | #### HINTS 903 | 904 | - The previous command was `sed 's/freecodecamp/f233C0d3C@mp/i' name.txt` 905 | - Here's an example: ` < ` 906 | - Enter `sed 's/freecodecamp/f233C0d3C@mp/i' < name.txt` in the terminal 907 | 908 | ## 680. cat name.txt | sed s/freecodecamp/f233C0d3C@mp/i 909 | 910 | ### 680.1 911 | 912 | The method of input didn't affect the output. Use the `cat` and `pipe` method this time to set the input for the `sed` command, replacing the same text. 913 | 914 | #### HINTS 915 | 916 | - The previous command was `sed 's/freecodecamp/f233C0d3C@mp/i' < name.txt` 917 | - Here's an example: `cat | ` 918 | - Enter `cat name.txt | sed 's/freecodecamp/f233C0d3C@mp/i'` in the terminal 919 | 920 | ## 690. grep -n meow[a-z] kitty_1 921 | 922 | ### 690.1 923 | 924 | Back to the task at hand. You want to add the line numbers asked for in the `kitty_info.txt` file. Use `grep` with the flag to show line numbers to find the `meow[a-z]*` pattern in the `kitty_ipsum_1.txt` file again. 925 | 926 | #### HINTS 927 | 928 | - Enter `man grep` to find the flag you need 929 | - It's the `-n` flag 930 | - Here's an example: `grep -n ` 931 | - Enter `grep -n 'meow[a-z]*' kitty_ipsum_1.txt` in the terminal 932 | 933 | ## 700. grep meow[a-z] kitty_1 -n | sed s/[0-9]/1/ 934 | 935 | ### 700.1 936 | 937 | You can use `sed` to change each line number in that output. Start by entering the last command and pipe the output into `sed` that replaces `[0-9]` with `1`. 938 | 939 | #### HINTS 940 | 941 | - A `sed` argument looks like this: `'s///'` 942 | - The `sed` argument is `s/[0-9]/1/` 943 | - The last command was `grep -n 'meow[a-z]*' kitty_ipsum_1.txt` 944 | - Here's an example: `grep -n 'meow[a-z]*' kitty_ipsum_1.txt | sed ''` 945 | - Enter `grep -n 'meow[a-z]*' kitty_ipsum_1.txt | sed 's/[0-9]/1/'` in the terminal 946 | 947 | ## 710. grep meow[a-z]* kitty_1 -n | sed s/[0-9]+/1/ 948 | 949 | ### 710.1 950 | 951 | That matched the first digit it found on each line and replaced it with `1`. Enter the same command but change the matching pattern to `[0-9]+` to match one or more numbers. 952 | 953 | #### HINTS 954 | 955 | - The previous command was `grep -n 'meow[a-z]*' kitty_ipsum_1.txt | sed 's/[0-9]/1/'` 956 | - Change the `sed` argument to `'s/[0-9]+'/1/` 957 | - Enter `grep -n 'meow[a-z]*' kitty_ipsum_1.txt | sed 's/[0-9]+/1/'` 958 | 959 | ## 720. man sed 960 | 961 | ### 720.1 962 | 963 | That didn't replace anything. Check the manual of `sed` quick to see if there's anything to help. 964 | 965 | #### HINTS 966 | 967 | - View a man with `man ` 968 | - Enter `man sed` in the terminal 969 | - Press enter until you have seen the whole manual 970 | 971 | ## 730. grep meow[a-z]* kitty_1 -n | sed -E s/[0-9]+/1/ 972 | 973 | ### 730.1 974 | 975 | Looks like there's a lot of options with `sed` as well. There's a flag to use extended regular expressions. Add it to that previous command that didn't work so it recognizes the `+` in your pattern. The previous command was `grep -n 'meow[a-z]*' kitty_ipsum_1.txt | sed 's/[0-9]+/1/'`. 976 | 977 | #### HINTS 978 | 979 | - Find the flag you need from the menu and add it to the previous command 980 | - Here's an example: ` | sed ''` 981 | - It's the `-E` flag 982 | - Enter `grep -n 'meow[a-z]*' kitty_ipsum_1.txt | sed -E 's/[0-9]+/1/'` in the terminal 983 | 984 | ## 740. grep meow[a-z]* kitty_1 -n | sed -E s/([0-9]+)/\1/ 985 | 986 | ### 740.1 987 | 988 | It worked that time. It replaced all the numbers at the start with a `1`. Next, you will use a capture group in the regex to capture the numbers so you can use them in the replacement area. Enter the same command but use `s/([0-9]+)/\1/` with `sed` to capture the numbers at the start. It will replace them with themselves for now. 989 | 990 | #### HINTS 991 | 992 | - The previous command was `grep 'meow[a-z]*' kitty_ipsum_1.txt -n | sed -E 's/[0-9]+/1/'` 993 | - Enter `grep -n 'meow[a-z]*' kitty_ipsum_1.txt | sed -E 's/([0-9]+)/\1/'` in the terminal 994 | 995 | ## 750. grep meow[a-z]* kitty_1 -n | sed -E s/([0-9]+).*/\1/ 996 | 997 | ### 750.1 998 | 999 | That matched all the numbers and replaced them with the same numbers. All you need to do is match everything else on each line and replace it with only the numbers. Add `.*` at the end of the `sed` matching pattern so it matches everything, captures the numbers, and replaces everything with the captured numbers. 1000 | 1001 | #### HINTS 1002 | 1003 | - The previous command was `grep 'meow[a-z]*' kitty_ipsum_1.txt -n | sed -E 's/([0-9]+)/\1/'` 1004 | - The new `sed` argument should be `'s/([0-9]+).*/\1/'` 1005 | - Enter `grep -n 'meow[a-z]*' kitty_ipsum_1.txt | sed -E 's/([0-9]+).*/\1/'` in the terminal 1006 | 1007 | ## 760. previous with >> kitty_info 1008 | 1009 | ### 760.1 1010 | 1011 | There's your list of numbers for the `kitty_info.txt` file. Enter the same command and append the list of numbers to it. 1012 | 1013 | #### HINTS 1014 | 1015 | - The previous command was `grep -n 'meow[a-z]*' kitty_ipsum_1.txt | sed -E 's/([0-9]+).*/\1/'` 1016 | - Here's an example: ` >> ` 1017 | - Append the output of the previous command with `>> kitty_info.txt` 1018 | - Enter `grep -n 'meow[a-z]*' kitty_ipsum_1.txt | sed -E 's/([0-9]+).*/\1/' >> kitty_info.txt` in the terminal 1019 | 1020 | ## 770. grep cat[a-z]* kitty_1 —-color 1021 | 1022 | ### 770.1 1023 | 1024 | Take a look at the file. Hopefully it doesn't look too messy. You can reset a lesson at any time if it doesn't look right, or if you accidentally change something in one of the other files. There's one more group of words to find info on for this file. Use `grep` with the `--color` flag to see all the words that start with `cat` in the same file. Use a similar pattern that you used to find words starting with `meow`. 1025 | 1026 | #### HINTS 1027 | 1028 | - You use `meow[a-z]*` to see all the words that start with `meow` 1029 | - Use `cat[a-z]*` as your pattern 1030 | - Here's an example: `grep --color '' ` 1031 | - Enter `grep --color 'cat[a-z]*' kitty_ipsum_1.txt` in the terminal 1032 | 1033 | ## 780. echo Number of times cat, cats, or catnip appears: >> kitty_info 1034 | 1035 | ### 780.1 1036 | 1037 | There's three variations of words starting with `cat`. Use `echo` with the `-e` flag to append `Number of times cat, cats, or catnip appears:` to the `kitty_info.txt` file. Put a new line at the beginning of the text like the other lines. 1038 | 1039 | #### HINTS 1040 | 1041 | - You previously entered `echo -e "\nLines that they appear on:" >> kitty_info.txt` 1042 | - Enter `echo -e "\nNumber of times cat, cats, or catnip appears:" >> kitty_info.txt` in the terminal 1043 | 1044 | ## 790. grep cat[a-z]* kitty_1 -o 1045 | 1046 | ### 790.1 1047 | 1048 | You will want to find the number of times those words appear again. First, use `grep` with the correct flag to put all the matches of the `cat[a-z]*` pattern on their own line. 1049 | 1050 | #### HINTS 1051 | 1052 | - Here's an example: `grep '' ` 1053 | - Make sure to use the `kitty_ipsum_1.txt` file 1054 | - You want the `-o` flag 1055 | - Enter `grep -o 'cat[a-z]*' kitty_ipsum_1.txt` in the terminal 1056 | 1057 | ## 800. grep cat[a-z]* kitty_1 -o | wc -l 1058 | 1059 | ### 800.1 1060 | 1061 | Enter the same command and pipe the output into the command that outputs the count of those lines. 1062 | 1063 | #### HINTS 1064 | 1065 | - You want to pipe the output of the previous command into the `wc` command 1066 | - The previous command was `grep -o 'cat[a-z]*' kitty_ipsum_1.txt` 1067 | - Use the correct flag with `wc` to output the line count of the grep output 1068 | - It's the `-l` flag 1069 | - Enter `grep -o 'cat[a-z]*' kitty_ipsum_1.txt | wc -l` 1070 | 1071 | ## 810. grep cat[a-z]* kitty_1 -o | wc -l >> kitty_info 1072 | 1073 | ### 810.1 1074 | 1075 | That's a count of how many times `cat`, `cats`, or `catnip` appears in the file. Enter the same command and append the count to the `kitty_info.txt` file. 1076 | 1077 | #### HINTS 1078 | 1079 | - The previous command was `grep -o 'cat[a-z]*' kitty_ipsum_1.txt | wc -l` 1080 | - Append output like this: `>> ` 1081 | - Enter `grep -o 'cat[a-z]*' kitty_ipsum_1.txt | wc -l >> kitty_info.txt` in the terminal 1082 | 1083 | ## 820. echo -e Lines that they appear on: >> kitty_info 1084 | 1085 | ### 820.1 1086 | 1087 | Next, use `echo` to add the text `Lines that they appear on:` to the `kitty_info.txt` file again. Place a new line in front of the text like before. 1088 | 1089 | #### HINTS 1090 | 1091 | - Here's an example: ` >> ` 1092 | - You want the `echo` command with the `-e` flag and the new line character (`\n`) 1093 | - You previously entered `echo -e "\nNumber of times cat, cats, or catnip appears:" >> kitty_info.txt` 1094 | - Enter `echo -e "\nLines that they appear on:" >> kitty_info.txt` in the terminal 1095 | 1096 | ## 830. grep cat[a-z]* kitty_1 -n 1097 | 1098 | ### 830.1 1099 | 1100 | The process to add the lines to the file will be the same as you did before. Start by using `grep` to match the `cat` words in the file and showing the line numbers with the output. 1101 | 1102 | #### HINTS 1103 | 1104 | - Here's an example: `grep '' ` 1105 | - Make sure to use the `cat[a-z]*` pattern again 1106 | - Use the `-n` flag to show the line numbers 1107 | - Enter `grep -n 'cat[a-z]*' kitty_ipsum_1.txt` in the terminal 1108 | 1109 | ## 840. grep cat[a-z]* kitty_1 -n | sed -E s/([0-9]+).*/\1/ 1110 | 1111 | ### 840.1 1112 | 1113 | That shows you the line numbers and text. You will have to use `sed` again to extract only the line numbers. Pipe the output of the last command into `sed` to do that. As a reminder, the `sed` pattern was `'s/([0-9]+).*/\1/'`. 1114 | 1115 | #### HINTS 1116 | 1117 | - The last command was `grep -n 'cat[a-z]*' kitty_ipsum_1.txt` 1118 | - Don't forget the `sed` flag for using extended regular expressions 1119 | - It's the `-E` flag 1120 | - You previously used `grep -n 'meow[a-z]*' kitty_ipsum_1.txt | sed -E 's/([0-9]+).*/\1/'` 1121 | - Enter `grep -n 'cat[a-z]*' kitty_ipsum_1.txt | sed -E 's/([0-9]+).*/\1/'` in the terminal 1122 | 1123 | ## 850. previous with >> kitty_info 1124 | 1125 | ### 850.1 1126 | 1127 | Awesome. Enter the last command and append the line numbers to the `kitty_info.txt` file. 1128 | 1129 | #### HINTS 1130 | 1131 | - The previous command was `grep -n 'cat[a-z]*' kitty_ipsum_1.txt | sed -E 's/([0-9]+).*/\1/'` 1132 | - Append to a file by adding `>> ` at the end of a command 1133 | - You previously used `grep -n 'meow[a-z]*' kitty_ipsum_1.txt | sed -E 's/([0-9]+).*/\1/' >> kitty_info.txt` 1134 | - Enter `grep -n 'cat[a-z]*' kitty_ipsum_1.txt | sed -E 's/([0-9]+).*/\1/' >> kitty_info.txt` in the terminal 1135 | 1136 | ## 860. echo -e \n\n~~ kitty_ipsum_2.txt info ~~ >> kitty_info 1137 | 1138 | ### 860.1 1139 | 1140 | Hopefully your info file is looking good. Next, you want to do the same thing for the `kitty_ipsum_2.txt` file. Using `echo` in the terminal, append `~~ kitty_ipsum_2.txt info ~~` to the `kitty_info.txt` file. Put **two** new lines in front of the text this time. 1141 | 1142 | #### HINTS 1143 | 1144 | - You want the `echo` command with the `-e` flag and the new line character (`\n`) twice 1145 | - Here's an example: `echo -e "\n\n" >> ` 1146 | - You previously entered `echo -e "\nLines that they appear on:" >> kitty_info.txt` 1147 | - Enter `echo -e "\n\n~~ kitty_ipsum_2.txt info ~~" >> kitty_info.txt` in the terminal 1148 | 1149 | ## 870. echo -e \nNumber of lines: >> kitty_info 1150 | 1151 | ### 870.1 1152 | 1153 | The first piece of info you want to know is the number of lines in the file. Use the terminal to append `Number of lines:` to the file with a new line in front. 1154 | 1155 | #### HINTS 1156 | 1157 | - You want the `echo` command with the `-e` flag and the new line character (`\n`) 1158 | - Here's an example: `echo -e "\n" >> ` 1159 | - You previously entered `echo -e "\nLines that they appear on:" >> kitty_info.txt` 1160 | - Enter `echo -e "\nNumber of lines:" >> kitty_info.txt` in the terminal 1161 | 1162 | ## 880. cat kitty_2 | wc -l >> kitty_info 1163 | 1164 | ### 880.1 1165 | 1166 | Use `cat` with the pipe method to append the info to the `kitty_info.txt` file that it is asking for. 1167 | 1168 | #### HINTS 1169 | 1170 | - Enter the commands one at a time to see the output first 1171 | - Here's an example: `cat | >> ` 1172 | - You want to `cat kitty_ipsum_2.txt` 1173 | - And pipe the output of that into the `wc` command 1174 | - Which uses the `-l` flag to get the number of lines in the file 1175 | - And appends the number to the file like this: `>> kitty_info.txt` 1176 | - You previously used `cat kitty_ipsum_1.txt | wc -w >> kitty_info.txt` 1177 | - Enter `cat kitty_ipsum_2.txt | wc -l >> kitty_info.txt` in the terminal 1178 | 1179 | ## 890. echo -e \nNumber of words: >> kitty_info 1180 | 1181 | ### 890.1 1182 | 1183 | Nice job! Next, use the terminal to append `Number of words:` to the `kitty_info.txt` file. Put a new line in front of the text again. 1184 | 1185 | #### HINTS 1186 | 1187 | - You want the `echo` command with the `-e` flag and the new line character (`\n`) 1188 | - Here's an example: `echo -e "\n" >> ` 1189 | - You previously entered `echo "\nNumber of lines:" >> kitty_info.txt` 1190 | - Enter `echo -e "\nNumber of words:" >> kitty_info.txt` 1191 | 1192 | ## 900. wc -w < kitty_ipsum_2.txt >> kitty_info 1193 | 1194 | ### 900.1 1195 | 1196 | Append the suggested info the `kitty_info.txt` file. Use redirection instead of the pipe method for the input this time. 1197 | 1198 | #### HINTS 1199 | 1200 | - Enter the commands one at a time to see the output first 1201 | - Here's an example: ` < >> ` 1202 | - You want to use `kitty_ipsum_2.txt` for the input of the `wc` command 1203 | - With the `-w` flag to get the number of words from the input 1204 | - And output the numbers of words to the file `>> kitty_info.txt` 1205 | - You previously used `wc -m < kitty_ipsum_1.txt >> kitty_info.txt` 1206 | - Enter `wc -w < kitty_ipsum_2.txt >> kitty_info.txt` in the terminal 1207 | 1208 | ## 910. echo -e \nNumber of characters: >> kitty_info 1209 | 1210 | ### 910.1 1211 | 1212 | Next, is the character count. Append `Number of characters:` to the file with a new line in front of the text. Use the method you have been using. 1213 | 1214 | #### HINTS 1215 | 1216 | - You want the `echo` command with the `-e` flag and the new line character (`\n`) 1217 | - Here's an example: `echo -e "\n" >> ` 1218 | - You previously entered `echo -e "\nNumber of words:" >> kitty_info.txt` 1219 | - Enter `echo -e "\nNumber of characters:" >> kitty_info.txt` in the terminal 1220 | 1221 | ## 920. wc -m < kitty_ipsum_2.txt >> kitty_info 1222 | 1223 | ### 920.1 1224 | 1225 | Using the pipe or input redirection method, append the character count of `kitty_ipsum_2.txt` to the `kitty_info.txt` file. 1226 | 1227 | #### HINTS 1228 | 1229 | - Enter the commands one at a time to see the output first 1230 | - You will want to use the `wc` command with the `-m` flag 1231 | - Here's an example: ` < >> ` 1232 | - You previously used `wc -w < kitty_ipsum_2.txt >> kitty_info.txt` 1233 | - Enter `wc -m < kitty_ipsum_2.txt >> kitty_info.txt` in the terminal 1234 | 1235 | ## 925. grep --color meow[a-z]* kitty_2 1236 | 1237 | ### 925.1 1238 | 1239 | Excellent. Next, use `grep` to see how many variations of `meow` there are in `kitty_ipsum_2.txt`. Use the same pattern you used before and add the flag to show colors so it's easier to see. 1240 | 1241 | #### HINTS 1242 | 1243 | - Here's an example `grep '' ` 1244 | - The pattern you want is `meow[a-z]*` 1245 | - Be sure to use the `--color` flag 1246 | - Enter `grep --color 'meow[a-z]*' kitty_ipsum_2.txt` in the terminal 1247 | 1248 | ## 930. echo -e \nNumber of times meow or meowzer appears: >> kitty_info 1249 | 1250 | ### 930.1 1251 | 1252 | It's the same variations as the other file. Append `Number of times meow or meowzer appears:` to the `kitty_info.txt` file with a new line in front of it like before. 1253 | 1254 | #### HINTS 1255 | 1256 | - You want the `echo` command with the `-e` flag and the new line character (`\n`) 1257 | - Here's an example: `echo -e "\n" >> ` 1258 | - You previously entered `echo -e "\nNumber of characters:" >> kitty_info.txt` 1259 | - Enter `echo -e "\nNumber of times meow or meowzer appears:" >> kitty_info.txt` in the terminal 1260 | 1261 | ## 940. grep -o 'meow[a-z]*' kitty_ipsum_2.txt | wc -l >> kitty_info 1262 | 1263 | ### 940.1 1264 | 1265 | Use `grep` and `wc` in the terminal to append the suggested number to the `kitty_info.txt` file. 1266 | 1267 | #### HINTS 1268 | 1269 | - Enter the commands one at a time to see the output first 1270 | - Here's an example: ` | >> kitty_info.txt` 1271 | - You want to use `grep` to get the matches for `meow[a-z]*` 1272 | - Add the flag to put the matched words on their own line 1273 | - It's the `-o` flag 1274 | - Pipe the `grep` results into the `wc` command 1275 | - Add the `-l` flag to the `wc` to count the lines 1276 | - Append the results of that to the file with `>> kitty_info.txt` 1277 | - You previously used `grep -o 'cat[a-z]*' kitty_ipsum_1.txt | wc -l >> kitty_info.txt` 1278 | - Enter `grep -o 'meow[a-z]*' kitty_ipsum_2.txt | wc -l >> kitty_info.txt` in the terminal 1279 | 1280 | ## 950. echo -e \nLines that they appear on: >> kitty_info 1281 | 1282 | ### 950.1 1283 | 1284 | :sunglasses: Next, use the terminal to append `Lines that they appear on:` to the `kitty_info.txt` file with a new line in front of the text. 1285 | 1286 | #### HINTS 1287 | 1288 | - Use the `echo` command with the `-e` flag and the new line character (`\n`) 1289 | - Here's an example: `echo -e "\n" >> ` 1290 | - You previously entered `echo -e "\nNumber of times meow or meowzer appears:" >> kitty_info.txt` 1291 | - Enter `echo -e "\nLines that they appear on:" >> kitty_info.txt` in the terminal 1292 | 1293 | ## 960. grep -n meow[a-z]* kitty_2 | sed -E s/([0-9]+).*/\1/ >> kitty_info 1294 | 1295 | ### 960.1 1296 | 1297 | Use `grep` and `sed` in the terminal to append the suggested line numbers to the `kitty_info.txt` file. 1298 | 1299 | #### HINTS 1300 | 1301 | - Here's an example: ` | >> kitty_info.txt` 1302 | - Enter the commands one at a time to see the output first 1303 | - You want to use `grep` to get the matches for `meow[a-z]*` 1304 | - Add the `-n` flag to `grep` to show the line numbers in front of the matches 1305 | - Pipe the `grep` results into the `sed` command 1306 | - The `sed` command should replace `([0-9]+).*'` with `\1` to get the line numbers 1307 | - Don't forget the `-E` flag with `sed` to allow extended regular expressions 1308 | - You `sed` arguments should be `-E 's/([0-9]+).*/\1/'` 1309 | - Append the results to the file with `>> kitty_info.txt` 1310 | - You previously used `grep -n 'cat[a-z]*' kitty_ipsum_1.txt | sed -E 's/([0-9]+).*/\1/' >> kitty_info.txt` in the terminal 1311 | - Enter `grep -n 'meow[a-z]*' kitty_ipsum_2.txt | sed -E 's/([0-9]+).*/\1/' >> kitty_info.txt` in the terminal 1312 | 1313 | ## 965. grep --color cat[a-z]* kitty_2 1314 | 1315 | ### 965.1 1316 | 1317 | :sunglasses: :sunglasses: Use `grep` to see how many variations of `cat` there are in `kitty_ipsum_2.txt`. Use the same pattern you used before and include the flag to show colors so it's easier to see. 1318 | 1319 | #### HINTS 1320 | 1321 | - Here's an example `grep '' ` 1322 | - The pattern you want is `cat[a-z]*` 1323 | - Be sure to use the `--color` flag 1324 | - Enter `grep --color 'cat[a-z]*' kitty_ipsum_2.txt` in the terminal 1325 | 1326 | ## 970. echo -e \nNumber of times cat, cats, or catnip appears: >> kitty_info 1327 | 1328 | ### 970.1 1329 | 1330 | Same variations as the other kitty ipsum file. Append `Number of times cat, cats, or catnip appears:` to the `kitty_info.txt` file. Use the method you have been using. 1331 | 1332 | #### HINTS 1333 | 1334 | - Don't forget the new line in front of the text 1335 | - Use the `echo` command with the `-e` flag and the new line character (`\n`) 1336 | - Here's an example: `echo -e "\n" >> ` 1337 | - You previously entered `echo -e "\nLines that they appear on:" >> kitty_info.txt` 1338 | - Enter `echo -e "\nNumber of times cat, cats, or catnip appears:" >> kitty_info.txt` in the terminal 1339 | 1340 | ## 980. grep -o 'cat[a-z]*' kitty_2 | wc -l >> kitty_info 1341 | 1342 | ### 980.1 1343 | 1344 | Use `grep` and `wc` in the terminal to append the suggested info to `kitty_info.txt` 1345 | 1346 | #### HINTS 1347 | 1348 | - Enter the commands one at a time to see the output first 1349 | - Here's an example: ` | >> kitty_info.txt` 1350 | - You want to use `grep` to get the matches for `cat[a-z]*` 1351 | - Add the `-o` flag to `grep` to put each match on it's own line 1352 | - Pipe the `grep` results into the `wc` command 1353 | - Add the `-l` flag to the `wc` to count the lines 1354 | - Append the results of that to the file with `>> kitty_info.txt` 1355 | - You previously used `grep -o 'meow[a-z]*' kitty_ipsum_1.txt | wc -l >> kitty_info.txt` 1356 | - Enter `grep -o 'cat[a-z]*' kitty_ipsum_2.txt | wc -l >> kitty_info.txt` in the terminal 1357 | 1358 | ## 990. echo -e \nLines that they appear on: >> kitty_info 1359 | 1360 | ### 990.1 1361 | 1362 | :sunglasses: :sunglasses: :sunglasses: One more. Append `Lines that they appear on:` to it like you did for the others. 1363 | 1364 | #### HINTS 1365 | 1366 | - Don't forget the new line 1367 | - Use the `echo` command with the `-e` flag and the new line character (`\n`) 1368 | - Here's an example: `echo -e "\n" >> ` 1369 | - You previously entered `echo -e "\nNumber of times cat, cats, or catnip appears:" >> kitty_info.txt` 1370 | - Enter `echo -e "\nLines that they appear on:" >> kitty_info.txt` in the terminal 1371 | 1372 | ## 1000. grep -n cat[a-z]* kitty_2 | sed -E >> kitty_info 1373 | 1374 | ### 1000.1 1375 | 1376 | Use `grep` and `sed` in the terminal to append the suggested numbers to the `kitty_info.txt` file. 1377 | 1378 | #### HINTS 1379 | 1380 | - Enter the commands one at a time to see the output first 1381 | - Here's an example: ` | >> kitty_info.txt` 1382 | - You want to use `grep` to get the matches for `cat[a-z]*` 1383 | - Add the `-n` flag to `grep` to show the line numbers in front of the matches 1384 | - Pipe the `grep` results into the `sed` command 1385 | - The `sed` command should replace `([0-9]+).*'` with `\1` to get the line numbers 1386 | - Don't forget the `-E` flag with `sed` to allow extended regular expressions 1387 | - You `sed` arguments should be `-E 's/([0-9]+).*/\1/'` 1388 | - Append the results to the file wiht `>> kitty_info.txt` 1389 | - You previously used `grep -n 'meow[a-z]*' kitty_ipsum_2.txt | sed -E 's/([0-9]+).*/\1/' >> kitty_info.txt` in the terminal 1390 | - Enter `grep -n 'cat[a-z]*' kitty_ipsum_2.txt | sed -E 's/([0-9]+).*/\1/' >> kitty_info.txt` in the terminal 1391 | 1392 | ## 1010. touch translate.sh 1393 | 1394 | ### 1010.1 1395 | 1396 | :sunglasses: :sunglasses: :sunglasses: :sunglasses: The `kitty_info` file is done and it has some information about the two ipsum files. Next, you will create a small script to translate both them into doggy ipsum. It will be as simple as replacing all the cat references with similar words for dogs. In the terminal, use `touch` to create `translate.sh`. 1397 | 1398 | #### HINTS 1399 | 1400 | - Here's an example: `touch ` 1401 | - Enter `touch translate.sh` in the terminal 1402 | - Make sure you are in the `project` folder first 1403 | 1404 | ## 1020. chmod +x ./translate.sh 1405 | 1406 | ### 1020.1 1407 | 1408 | Give your new script executable permissions so you can run it in the terminal. 1409 | 1410 | #### HINTS 1411 | 1412 | - Here's an example: `chmod +x ` 1413 | - Enter `chmod +x translate.sh` in the terminal 1414 | 1415 | ## 1030. Add shebang 1416 | 1417 | ### 1030.1 1418 | 1419 | Add a shebang to the script that uses `bash` like you did for the other script you made. 1420 | 1421 | #### HINTS 1422 | 1423 | - The shebang for bash is `#!/bin/bash` 1424 | - Add the suggestion at the top of the `translate.sh` file 1425 | - Add `#!/bin/bash` at the top of the `translate.sh` file 1426 | 1427 | ## 1040. Add cat $1 1428 | 1429 | ### 1040.1 1430 | 1431 | The script will take a file as input that can be passed as an argument or read from `stdin`. Below the shebang, use `cat` to print the content of the first argument passed to the script. 1432 | 1433 | #### HINTS 1434 | 1435 | - Here's an example: `cat ` 1436 | - You can access an arguement with `$` 1437 | - Access the arguement with `$1` 1438 | - Add `cat $1` below the shebang in your `translate.sh` file 1439 | 1440 | ## 1050. ./translate.sh kitty_1 1441 | 1442 | ### 1050.1 1443 | 1444 | Run the script and use the first kitty ipsum file as an argument to see if it's working. 1445 | 1446 | #### HINTS 1447 | 1448 | - Here's an example: ` ` 1449 | - Enter `./translate.sh kitty_ipsum_1.txt` in the terminal 1450 | 1451 | ## 1060. ./translate.sh < kitty_1 1452 | 1453 | ### 1060.1 1454 | 1455 | Try the same command using redirection to print the file. 1456 | 1457 | #### HINTS 1458 | 1459 | - Here's an example: ` < ` 1460 | - Redirect the `kitty_ipsum_1.txt` file as input for your script 1461 | - Enter `./translate.sh < kitty_ipsum_1.txt` in the terminal 1462 | 1463 | ## 1070. cat kitty_1 | ./translate.sh 1464 | 1465 | ### 1070.1 1466 | 1467 | Looks like that is working. Try the `cat` and pipe method. 1468 | 1469 | #### HINTS 1470 | 1471 | - Here's and example `cat | ` 1472 | - Use `cat` to set the content of `kitty_ipsum_1.txt` as input for your script 1473 | - Enter `cat kitty_ipsum_1.txt | ./translate.sh` in the terminal 1474 | 1475 | ## 1080. Add | sed s/catnip/dogchow/ 1476 | 1477 | ### 1080.1 1478 | 1479 | Using any of those three methods as input is working. Time to start replacing some of the text with doggy ipsum. In your script file, pipe the input into a `sed` that replaces `catnip` with `dogchow`. 1480 | 1481 | #### HINTS 1482 | 1483 | - Here's an example: `cat $1 | sed 's///'` 1484 | - The `sed` argument should be `s/catnip/dogchow/` 1485 | - The `translate.sh` file should look like this: 1486 | ```sh 1487 | #!/bin/bash 1488 | 1489 | cat $1 | sed 's/catnip/dogchow/' 1490 | ``` 1491 | 1492 | ## 1090. ./translate kitty_1 1493 | 1494 | ### 1090.1 1495 | 1496 | Run the script passing the first kitty ipsum file as a argument to see if it's working. 1497 | 1498 | #### HINTS 1499 | 1500 | - Here's an example: ` ` 1501 | - Use the `kitty_ipsum_1.txt` file as the argument 1502 | - Enter `./translate.sh kitty_ipsum_1.txt` in the terminal 1503 | 1504 | ## 1100. ./translate kitty_1 | grep --color dogchow 1505 | 1506 | ### 1100.1 1507 | 1508 | If you look, you can find `dogchow` in there so it's probably working. To make sure pipe the results of that into a `grep` command that searches for `dogchow`. Output the results in color. 1509 | 1510 | #### HINTS 1511 | 1512 | - The previous command was `./translate.sh kitty_ipsum_1.txt` 1513 | - Pipe the results of the previous command into `grep` so it searches for `dogchow` 1514 | - Don't forget the `--color` flag to show the results in color 1515 | - Here's an example: `./translate.sh kitty_ipsum_1.txt | grep ''` 1516 | - Enter `./translate.sh kitty_ipsum_1.txt | grep --color 'dogchow'` in the terminal 1517 | 1518 | ## 1110. ./translate kitty_1 | grep --color catnip 1519 | 1520 | ### 1110.1 1521 | 1522 | It's showing three places `catnip` was replaced with `dogchow`. To make sure you got them all, enter the previous command and search for `catnip` instead. 1523 | 1524 | #### HINTS 1525 | 1526 | - The previous command was `./translate.sh kitty_ipsum_1.txt | grep --color 'dogchow'` 1527 | - Replace `dogchow` with `catnip` in the previous command 1528 | - Enter `./translate.sh kitty_ipsum_1.txt | grep --color 'catnip'` in the terminal 1529 | 1530 | ## 1120. Add s/cat/dog/ 1531 | 1532 | ### 1120.1 1533 | 1534 | It didn't output anything, so it must be replacing all the instances of `catnip`. You can replace many patterns using `sed` like this: `sed 's///; s///'`. Note that you need the semi-colon between the two replacement patterns and they both need to be wrapped in the quotes. In your script, add another pattern to the `sed` command that replaces `cat` with `dog`. 1535 | 1536 | #### HINTS 1537 | 1538 | - The code looks like this: `s/cat/dog/` 1539 | - The `translate.sh` file should look like this: 1540 | ```sh 1541 | #!/bin/bash 1542 | 1543 | cat $1 | sed 's/catnip/dogchow/; s/cat/dog/' 1544 | ``` 1545 | 1546 | ## 1130. ./translate.sh kitty_1 | grep --color dog[a-z] 1547 | 1548 | ### 1130.1 1549 | 1550 | Now, it should replace `catnip` with `dogchow` and `cat` with `dog`. Use the script to translate the first ipsum file again. Search the results with `grep` for any words that start with `dog`. Part of that search pattern should be `[a-z]*`. Make sure to show the results in color. 1551 | 1552 | #### HINTS 1553 | 1554 | - You previously entered `./translate.sh kitty_ipsum_1.txt | grep --color 'catnip'` 1555 | - The `grep` pattern you want is `dog[a-z]*` 1556 | - Enter `./translate.sh kitty_ipsum_1.txt | grep --color 'dog[a-z]*'` in the terminal 1557 | 1558 | ## 1135. ./translate.sh kitty_1 | grep --color cat[a-z] 1559 | 1560 | ### 1135.1 1561 | 1562 | As expected, it replaced instances of `cat` with `dog`. Enter the same command, but search for anything starting with `cat` to make sure it replaced them all. 1563 | 1564 | #### HINTS 1565 | 1566 | - The previous command was `./translate.sh kitty_ipsum_1.txt | grep --color 'dog[a-z]*'` 1567 | - Replace `dog[a-z]*` with `cat[a-z]*` in the previous command 1568 | - Enter `./translate.sh kitty_ipsum_1.txt | grep --color 'cat[a-z]*'` in the terminal 1569 | 1570 | ## 1140. Add s/meow/woof/ 1571 | 1572 | ### 1140.1 1573 | 1574 | It didn't find any so it must be replacing them all. You added two patterns as part of the `sed` in your script. Add a third that replaces all `meow` words with `woof`. 1575 | 1576 | #### HINTS 1577 | 1578 | - You can add another pattern to replace like before. Add a semi-colon and another pattern in the quotes of the `sed` 1579 | - Here's an example: `sed 's///; s///; s///'` 1580 | - The third pattern should be `s/meow/woof/` 1581 | - The `translate.sh` file should look like this: 1582 | ```sh 1583 | #!/bin/bash 1584 | 1585 | cat $1 | sed 's/catnip/dogchow/; s/cat/dog/; s/meow/woof/' 1586 | ``` 1587 | 1588 | ## 1150. ./translate.sh kitty_1 | grep --color dog[a-z]woof[a-z] 1589 | 1590 | ### 1150.1 1591 | 1592 | Using your script, translate the first ipsum file again. Check the results with `grep` for words that start with `dog` or `woof`. Here's an example of the search pattern you want: `grep '|'`. To view "dog words", you would use `dog[a-z]*`. Be sure to view the result in color. 1593 | 1594 | #### HINTS 1595 | 1596 | - You previously entered `./translate.sh kitty_ipsum_1.txt | grep --color 'cat[a-z]*'` 1597 | - You want to find "dog" words with `dog[a-z]*` and "woof" words with `woof[a-z]*` 1598 | - The search pattern you should use is `'dog[a-z]*|woof[a-z]*'` 1599 | - Enter `./translate.sh kitty_ipsum_1.txt | grep --color 'dog[a-z]*|woof[a-z]*'` in the terminal 1600 | 1601 | ## 1160. ./translate.sh kitty_1 | grep --color -E dog[a-z]woof[a-z] 1602 | 1603 | ### 1160.1 1604 | 1605 | That didn't work. Enter the same command, but add the flag to use extended regular expressions to the `grep` search so it recognizes the `|`. 1606 | 1607 | #### HINTS 1608 | 1609 | - The last command was `./translate.sh kitty_ipsum_1.txt | grep --color 'dog[a-z]*|woof[a-z]*'` 1610 | - Find the flag you want in the `grep` manual 1611 | - View the manual with `man grep` 1612 | - It's the `-E` flag 1613 | - Enter `./translate.sh kitty_ipsum_1.txt | grep --color -E 'dog[a-z]*|woof[a-z]*'` in the terminal 1614 | 1615 | ## 1170. Add g regex flag 1616 | 1617 | ### 1170.1 1618 | 1619 | If you look closely, you can see that the `meow` part of `meowzer` on that one line didn't get replaced with `woof`. `grep` only matched the first instance of `meow` it found on that line. Add the "global" regex flag to all three patterns of the `sed` command in your script so it will replace all instances of any of the words. 1620 | 1621 | #### HINTS 1622 | 1623 | - Here's an example of one pattern: `s///` 1624 | - It's the `g` flag 1625 | - Your `translate.sh` file should look like this: 1626 | ```sh 1627 | #!/bin/bash 1628 | 1629 | cat $1 | sed 's/catnip/dogchow/g; s/cat/dog/g; s/meow/woof/g' 1630 | ``` 1631 | 1632 | ## 1180. ./translate.sh kitty_1 | grep --color -E dog[a-z]woof[a-z] 1633 | 1634 | ### 1180.1 1635 | 1636 | Enter the same command to translate the first ipsum file and see the matches of all words starting with `dog` or `woof` to see if that worked. 1637 | 1638 | #### HINTS 1639 | 1640 | - You can find previously entered commands using the arrow on the keyboard while the terminal is focused 1641 | - Enter `./translate.sh kitty_ipsum_1.txt | grep --color -E 'dog[a-z]*|woof[a-z]*'` in the terminal 1642 | 1643 | ## 1190. Add -E s/meow|meowzer/woof/ 1644 | 1645 | ### 1190.1 1646 | 1647 | It worked, but `woofzer` doesn't sound quite right. Change your `sed` pattern that matched `meow` to match `meow|meowzer`. Add the flag to use extended regular expressions to the `sed` command so it recognizes the `|`. 1648 | 1649 | #### HINTS 1650 | 1651 | - The last `sed` pattern in you scrip should be `s/meow|meowzer/woof/` 1652 | - And you should add the `-E` flag to the `sed` command 1653 | - Your `translate.sh` file should look like this: 1654 | ```sh 1655 | #!/bin/bash 1656 | 1657 | cat $1 | sed -E 's/catnip/dogchow/g; s/cat/dog/g; s/meow|meowzer/woof/g' 1658 | ``` 1659 | 1660 | ## 1200. ./translate.sh kitty_1 | grep --color -E dog[a-z]woof[a-z] 1661 | 1662 | ### 1200.1 1663 | 1664 | Now it should replace either of those two words with `woof`. Check it again with that command you entered before that searches for `dog` or `woof` words. 1665 | 1666 | #### HINTS 1667 | 1668 | - You can use the up arrow in the terminal to find previously entered commands 1669 | - Enter `./translate.sh kitty_ipsum_1.txt | grep --color -E 'dog[a-z]*|woof[a-z]*'` in the terminal 1670 | 1671 | ## 1210. ./translate.sh kitty_1 | grep --color -E meow[a-z]cat[a-z] 1672 | 1673 | ### 1210.1 1674 | 1675 | It replaced `meowzer` that time. To be sure it replaced all the words in the file, enter the same command but check for `meow` or `cat` words in the same way. 1676 | 1677 | #### HINTS 1678 | 1679 | - The last command was `./translate.sh kitty_ipsum_1.txt | grep --color -E 'dog[a-z]*|woof[a-z]*'` 1680 | - Replace the matching pattern with `meow[a-z]*|cat[a-z]*` 1681 | - Enter `./translate.sh kitty_ipsum_1.txt | grep --color -E 'meow[a-z]*|cat[a-z]*'` in the terminal 1682 | 1683 | ## 1220. ./translate.sh kitty_2 | grep --color -E meow[a-z]cat[a-z] 1684 | 1685 | ### 1220.1 1686 | 1687 | No results means it didn't find any matches for `cat` or `meow` words after being translated. Check the second kitty ipsum file for the same pattern to make sure it's replacing all those words. 1688 | 1689 | #### HINTS 1690 | 1691 | - You can find previously entered commands using the arrow on the keyboard while the terminal is focused 1692 | - The last command was `./translate.sh kitty_ipsum_1.txt | grep --color -E 'meow[a-z]*|cat[a-z]*'` 1693 | - Change the last command to use the `kitty_ipsum_2.txt` file 1694 | - Enter `./translate.sh kitty_ipsum_2.txt | grep --color -E 'meow[a-z]*|cat[a-z]*'` in the terminal 1695 | 1696 | ## 1230. ./translate.sh kitty_1 > doggy_1 1697 | 1698 | ### 1230.1 1699 | 1700 | Okay, your script is finished. Translate the `kitty_ipsum_1.txt` file, using the filename as an argument, and put the output into a new `doggy_ipsum_1.txt` file. 1701 | 1702 | #### HINTS 1703 | 1704 | - Redirect the `stdout` of translating `kitty_ipsum_1.txt` to `doggy_ipsum_1.txt` 1705 | - Here's an example: ` > ` 1706 | - Enter `./translate.sh kitty_ipsum_1.txt > doggy_ipsum_1.txt` in the terminal 1707 | 1708 | ## 1240. cat doggy_1 1709 | 1710 | ### 1240.1 1711 | 1712 | Use `cat` to print the new file to the terminal. 1713 | 1714 | #### HINTS 1715 | 1716 | - Here's an example: `cat ` 1717 | - Enter `cat doggy_ipsum_1.txt` in the terminal 1718 | 1719 | ## 1250. diff kitty_1 doggy_1 1720 | 1721 | ### 1250.1 1722 | 1723 | It looks good :thumbsup: `diff` is a command to view the difference between two files. You can use it like this: `diff `. Use it to view the difference between the `kitty_ipsum_1` and `doggy_ipsum_1` files. 1724 | 1725 | #### HINTS 1726 | 1727 | - Enter `diff kitty_ipsum_1.txt doggy_ipsum_1.txt` in the terminal 1728 | 1729 | ## 1260. man diff 1730 | 1731 | ### 1260.1 1732 | 1733 | It may look a little cryptic, but it's showing the lines that don't match in the two files. Check the manual of `diff` to see if there's any way to make it prettier. 1734 | 1735 | #### HINTS 1736 | 1737 | - View the manual of a command with `man` 1738 | - Here's an example: `man ` 1739 | - Enter `man diff` in the terminal 1740 | - Press enter until you have seen the whole manual 1741 | 1742 | ## 1270. diff --color kitty_1 doggy_1 1743 | 1744 | ### 1270.1 1745 | 1746 | Use the flag to show the diff of the same two files in color. 1747 | 1748 | #### HINTS 1749 | 1750 | - You previously entered `diff kitty_ipsum_1.txt doggy_ipsum_1.txt` 1751 | - The flag you want is `--color` 1752 | - Enter `diff --color kitty_ipsum_1.txt doggy_ipsum_1.txt` in the terminal 1753 | 1754 | ## 1280. ./translate.sh kitty_2 > doggy_2 1755 | 1756 | ### 1280.1 1757 | 1758 | That's better. The red lines are lines that aren't in the second file, and the green lines are what they were replaced with. The line numbers that were changed are above each section. Translate your second kitty ipsum file and redirect the output into `doggy_ipsum_2.txt`. 1759 | 1760 | #### HINTS 1761 | 1762 | - You previously entered `./translate.sh kitty_ipsum_1.txt > doggy_ipsum_1.txt` 1763 | - Enter `./translate.sh kitty_ipsum_2.txt > doggy_ipsum_2.txt` in the terminal 1764 | 1765 | ## 1290. cat doggy_2 1766 | 1767 | ### 1290.1 1768 | 1769 | View the content of your new file with `cat` 1770 | 1771 | #### HINTS 1772 | 1773 | - Here's an example: `cat ` 1774 | - Enter `cat doggy_ipsum_2.txt` in the terminal 1775 | 1776 | ## 1300. diff --color kitty_2 doggy_2 1777 | 1778 | ### 1300.1 1779 | 1780 | Lastly, view the `diff` of the two files in color again. 1781 | 1782 | #### HINTS 1783 | 1784 | - Here's the example again: `diff ` 1785 | - Don't forget the flag to show the colors 1786 | - It's the `--color` flag 1787 | - You previosly entered `diff --color kitty_ipsum_1.txt doggy_ipsum_1.txt` 1788 | - Enter `diff --color kitty_ipsum_2.txt doggy_ipsum_2.txt` in the terminal 1789 | -------------------------------------------------------------------------------- /coderoad.yaml: -------------------------------------------------------------------------------- 1 | id: 'freeCodeCamp/learn-advanced-bash-by-building-a-kitty-ipsum-translator:v1.0.0' 2 | version: '2.0.0' 3 | config: 4 | setup: 5 | commands: 6 | - ./.freeCodeCamp/setup.sh 7 | - ./.freeCodeCamp/reset.sh 8 | - cd .freeCodeCamp && npm install 9 | testRunner: 10 | command: npm run programmatic-test 11 | args: 12 | tap: --reporter=mocha-tap-reporter 13 | directory: .freeCodeCamp 14 | repo: 15 | uri: https://github.com/freeCodeCamp/learn-advanced-bash-by-building-a-kitty-ipsum-translator 16 | branch: v2.0.0 17 | continue: 18 | commands: 19 | - './.freeCodeCamp/setup.sh' 20 | - './.freeCodeCamp/reset.sh' 21 | reset: 22 | commands: 23 | - './.freeCodeCamp/setup.sh' 24 | - './.freeCodeCamp/reset.sh' 25 | dependencies: 26 | - name: node 27 | version: '>=10' 28 | webhook: 29 | url: 'https://api.freecodecamp.org/coderoad-challenge-completed' 30 | events: 31 | init: false 32 | reset: false 33 | step_complete: false 34 | level_complete: false 35 | tutorial_complete: true 36 | levels: 37 | - id: '10' 38 | steps: 39 | - id: '10.1' 40 | setup: 41 | watchers: 42 | - ../.bash_history 43 | - id: '20' 44 | steps: 45 | - id: '20.1' 46 | setup: 47 | watchers: 48 | - ../.bash_history 49 | - id: '30' 50 | steps: 51 | - id: '30.1' 52 | setup: 53 | watchers: 54 | - ../.bash_history 55 | - id: '40' 56 | steps: 57 | - id: '40.1' 58 | setup: 59 | watchers: 60 | - ../.bash_history 61 | - id: '50' 62 | steps: 63 | - id: '50.1' 64 | setup: 65 | watchers: 66 | - ../.bash_history 67 | - id: '60' 68 | steps: 69 | - id: '60.1' 70 | setup: 71 | watchers: 72 | - ../.bash_history 73 | - id: '70' 74 | steps: 75 | - id: '70.1' 76 | setup: 77 | watchers: 78 | - ../.bash_history 79 | - id: '80' 80 | steps: 81 | - id: '80.1' 82 | setup: 83 | watchers: 84 | - ../.bash_history 85 | - id: '90' 86 | steps: 87 | - id: '90.1' 88 | setup: 89 | watchers: 90 | - ../.bash_history 91 | - id: '100' 92 | steps: 93 | - id: '100.1' 94 | setup: 95 | watchers: 96 | - ./.freeCodeCamp/test/.next_command 97 | - id: '110' 98 | steps: 99 | - id: '110.1' 100 | setup: 101 | watchers: 102 | - ../.bash_history 103 | - id: '115' 104 | steps: 105 | - id: '115.1' 106 | setup: 107 | watchers: 108 | - ../.bash_history 109 | - id: '120' 110 | steps: 111 | - id: '120.1' 112 | setup: 113 | watchers: 114 | - ../.bash_history 115 | - id: '140' 116 | steps: 117 | - id: '140.1' 118 | setup: 119 | watchers: 120 | - ../.bash_history 121 | - id: '150' 122 | steps: 123 | - id: '150.1' 124 | setup: 125 | watchers: 126 | - ../.bash_history 127 | - id: '160' 128 | steps: 129 | - id: '160.1' 130 | setup: 131 | watchers: 132 | - ../.bash_history 133 | - id: '170' 134 | steps: 135 | - id: '170.1' 136 | setup: 137 | watchers: 138 | - ../.bash_history 139 | - id: '175' 140 | steps: 141 | - id: '175.1' 142 | setup: 143 | watchers: 144 | - ../.bash_history 145 | - id: '178' 146 | steps: 147 | - id: '178.1' 148 | setup: 149 | watchers: 150 | - ./.freeCodeCamp/test/.next_command 151 | - id: '180' 152 | steps: 153 | - id: '180.1' 154 | setup: 155 | watchers: 156 | - ../.bash_history 157 | - id: '185' 158 | steps: 159 | - id: '185.1' 160 | setup: 161 | watchers: 162 | - ../.bash_history 163 | - id: '190' 164 | steps: 165 | - id: '190.1' 166 | setup: 167 | watchers: 168 | - ../.bash_history 169 | - id: '200' 170 | steps: 171 | - id: '200.1' 172 | setup: 173 | watchers: 174 | - ../.bash_history 175 | - id: '210' 176 | steps: 177 | - id: '210.1' 178 | setup: 179 | watchers: 180 | - ../.bash_history 181 | - id: '220' 182 | steps: 183 | - id: '220.1' 184 | setup: 185 | watchers: 186 | - ../.bash_history 187 | - id: '230' 188 | steps: 189 | - id: '230.1' 190 | setup: 191 | watchers: 192 | - ./script.sh 193 | - id: '240' 194 | steps: 195 | - id: '240.1' 196 | setup: 197 | watchers: 198 | - ./script.sh 199 | - id: '250' 200 | steps: 201 | - id: '250.1' 202 | setup: 203 | watchers: 204 | - ./script.sh 205 | - id: '260' 206 | steps: 207 | - id: '260.1' 208 | setup: 209 | watchers: 210 | - ./script.sh 211 | - id: '264' 212 | steps: 213 | - id: '264.1' 214 | setup: 215 | watchers: 216 | - ./.freeCodeCamp/test/.next_command 217 | - id: '266' 218 | steps: 219 | - id: '266.1' 220 | setup: 221 | watchers: 222 | - ../.bash_history 223 | - id: '270' 224 | steps: 225 | - id: '270.1' 226 | setup: 227 | watchers: 228 | - ../.bash_history 229 | - id: '280' 230 | steps: 231 | - id: '280.1' 232 | setup: 233 | watchers: 234 | - ../.bash_history 235 | - id: '290' 236 | steps: 237 | - id: '290.1' 238 | setup: 239 | watchers: 240 | - ../.bash_history 241 | - id: '300' 242 | steps: 243 | - id: '300.1' 244 | setup: 245 | watchers: 246 | - ../.bash_history 247 | - id: '310' 248 | steps: 249 | - id: '310.1' 250 | setup: 251 | watchers: 252 | - ../.bash_history 253 | - id: '320' 254 | steps: 255 | - id: '320.1' 256 | setup: 257 | watchers: 258 | - ../.bash_history 259 | - id: '324' 260 | steps: 261 | - id: '324.1' 262 | setup: 263 | watchers: 264 | - ../.bash_history 265 | - id: '326' 266 | steps: 267 | - id: '326.1' 268 | setup: 269 | watchers: 270 | - ../.bash_history 271 | - id: '330' 272 | steps: 273 | - id: '330.1' 274 | setup: 275 | watchers: 276 | - ../.bash_history 277 | - id: '340' 278 | steps: 279 | - id: '340.1' 280 | setup: 281 | watchers: 282 | - ../.bash_history 283 | - id: '350' 284 | steps: 285 | - id: '350.1' 286 | setup: 287 | watchers: 288 | - ../.bash_history 289 | - id: '360' 290 | steps: 291 | - id: '360.1' 292 | setup: 293 | watchers: 294 | - ../.bash_history 295 | - id: '370' 296 | steps: 297 | - id: '370.1' 298 | setup: 299 | watchers: 300 | - ../.bash_history 301 | - id: '380' 302 | steps: 303 | - id: '380.1' 304 | setup: 305 | watchers: 306 | - ../.bash_history 307 | - id: '390' 308 | steps: 309 | - id: '390.1' 310 | setup: 311 | watchers: 312 | - ../.bash_history 313 | - id: '400' 314 | steps: 315 | - id: '400.1' 316 | setup: 317 | watchers: 318 | - ../.bash_history 319 | - id: '420' 320 | steps: 321 | - id: '420.1' 322 | setup: 323 | watchers: 324 | - ../.bash_history 325 | - id: '430' 326 | steps: 327 | - id: '430.1' 328 | setup: 329 | watchers: 330 | - ../.bash_history 331 | - id: '440' 332 | steps: 333 | - id: '440.1' 334 | setup: 335 | watchers: 336 | - ../.bash_history 337 | - id: '450' 338 | steps: 339 | - id: '450.1' 340 | setup: 341 | watchers: 342 | - ../.bash_history 343 | - id: '460' 344 | steps: 345 | - id: '460.1' 346 | setup: 347 | watchers: 348 | - ../.bash_history 349 | - id: '470' 350 | steps: 351 | - id: '470.1' 352 | setup: 353 | watchers: 354 | - ../.bash_history 355 | - id: '480' 356 | steps: 357 | - id: '480.1' 358 | setup: 359 | watchers: 360 | - ../.bash_history 361 | - id: '490' 362 | steps: 363 | - id: '490.1' 364 | setup: 365 | watchers: 366 | - ../.bash_history 367 | - id: '500' 368 | steps: 369 | - id: '500.1' 370 | setup: 371 | watchers: 372 | - ../.bash_history 373 | - id: '510' 374 | steps: 375 | - id: '510.1' 376 | setup: 377 | watchers: 378 | - ../.bash_history 379 | - id: '520' 380 | steps: 381 | - id: '520.1' 382 | setup: 383 | watchers: 384 | - ../.bash_history 385 | - id: '530' 386 | steps: 387 | - id: '530.1' 388 | setup: 389 | watchers: 390 | - ../.bash_history 391 | - id: '540' 392 | steps: 393 | - id: '540.1' 394 | setup: 395 | watchers: 396 | - ../.bash_history 397 | - id: '550' 398 | steps: 399 | - id: '550.1' 400 | setup: 401 | watchers: 402 | - ../.bash_history 403 | - id: '560' 404 | steps: 405 | - id: '560.1' 406 | setup: 407 | watchers: 408 | - ../.bash_history 409 | - id: '570' 410 | steps: 411 | - id: '570.1' 412 | setup: 413 | watchers: 414 | - ../.bash_history 415 | - id: '580' 416 | steps: 417 | - id: '580.1' 418 | setup: 419 | watchers: 420 | - ../.bash_history 421 | - id: '590' 422 | steps: 423 | - id: '590.1' 424 | setup: 425 | watchers: 426 | - ../.bash_history 427 | - id: '600' 428 | steps: 429 | - id: '600.1' 430 | setup: 431 | watchers: 432 | - ../.bash_history 433 | - id: '610' 434 | steps: 435 | - id: '610.1' 436 | setup: 437 | watchers: 438 | - ../.bash_history 439 | - id: '620' 440 | steps: 441 | - id: '620.1' 442 | setup: 443 | watchers: 444 | - ../.bash_history 445 | - id: '630' 446 | steps: 447 | - id: '630.1' 448 | setup: 449 | watchers: 450 | - ../.bash_history 451 | - id: '635' 452 | steps: 453 | - id: '635.1' 454 | setup: 455 | watchers: 456 | - ../.bash_history 457 | - id: '640' 458 | steps: 459 | - id: '640.1' 460 | setup: 461 | watchers: 462 | - ../.bash_history 463 | - id: '650' 464 | steps: 465 | - id: '650.1' 466 | setup: 467 | watchers: 468 | - ../.bash_history 469 | - id: '660' 470 | steps: 471 | - id: '660.1' 472 | setup: 473 | watchers: 474 | - ../.bash_history 475 | - id: '670' 476 | steps: 477 | - id: '670.1' 478 | setup: 479 | watchers: 480 | - ../.bash_history 481 | - id: '675' 482 | steps: 483 | - id: '675.1' 484 | setup: 485 | watchers: 486 | - ../.bash_history 487 | - id: '680' 488 | steps: 489 | - id: '680.1' 490 | setup: 491 | watchers: 492 | - ../.bash_history 493 | - id: '690' 494 | steps: 495 | - id: '690.1' 496 | setup: 497 | watchers: 498 | - ../.bash_history 499 | - id: '700' 500 | steps: 501 | - id: '700.1' 502 | setup: 503 | watchers: 504 | - ../.bash_history 505 | - id: '710' 506 | steps: 507 | - id: '710.1' 508 | setup: 509 | watchers: 510 | - ../.bash_history 511 | - id: '720' 512 | steps: 513 | - id: '720.1' 514 | setup: 515 | watchers: 516 | - ../.bash_history 517 | - id: '730' 518 | steps: 519 | - id: '730.1' 520 | setup: 521 | watchers: 522 | - ../.bash_history 523 | - id: '740' 524 | steps: 525 | - id: '740.1' 526 | setup: 527 | watchers: 528 | - ../.bash_history 529 | - id: '750' 530 | steps: 531 | - id: '750.1' 532 | setup: 533 | watchers: 534 | - ../.bash_history 535 | - id: '760' 536 | steps: 537 | - id: '760.1' 538 | setup: 539 | watchers: 540 | - ../.bash_history 541 | - id: '770' 542 | steps: 543 | - id: '770.1' 544 | setup: 545 | watchers: 546 | - ../.bash_history 547 | - id: '780' 548 | steps: 549 | - id: '780.1' 550 | setup: 551 | watchers: 552 | - ../.bash_history 553 | - id: '790' 554 | steps: 555 | - id: '790.1' 556 | setup: 557 | watchers: 558 | - ../.bash_history 559 | - id: '800' 560 | steps: 561 | - id: '800.1' 562 | setup: 563 | watchers: 564 | - ../.bash_history 565 | - id: '810' 566 | steps: 567 | - id: '810.1' 568 | setup: 569 | watchers: 570 | - ../.bash_history 571 | - id: '820' 572 | steps: 573 | - id: '820.1' 574 | setup: 575 | watchers: 576 | - ../.bash_history 577 | - id: '830' 578 | steps: 579 | - id: '830.1' 580 | setup: 581 | watchers: 582 | - ../.bash_history 583 | - id: '840' 584 | steps: 585 | - id: '840.1' 586 | setup: 587 | watchers: 588 | - ../.bash_history 589 | - id: '850' 590 | steps: 591 | - id: '850.1' 592 | setup: 593 | watchers: 594 | - ../.bash_history 595 | - id: '860' 596 | steps: 597 | - id: '860.1' 598 | setup: 599 | watchers: 600 | - ../.bash_history 601 | - id: '870' 602 | steps: 603 | - id: '870.1' 604 | setup: 605 | watchers: 606 | - ../.bash_history 607 | - id: '880' 608 | steps: 609 | - id: '880.1' 610 | setup: 611 | watchers: 612 | - ../.bash_history 613 | - id: '890' 614 | steps: 615 | - id: '890.1' 616 | setup: 617 | watchers: 618 | - ../.bash_history 619 | - id: '900' 620 | steps: 621 | - id: '900.1' 622 | setup: 623 | watchers: 624 | - ../.bash_history 625 | - id: '910' 626 | steps: 627 | - id: '910.1' 628 | setup: 629 | watchers: 630 | - ../.bash_history 631 | - id: '920' 632 | steps: 633 | - id: '920.1' 634 | setup: 635 | watchers: 636 | - ../.bash_history 637 | - id: '925' 638 | steps: 639 | - id: '925.1' 640 | setup: 641 | watchers: 642 | - ../.bash_history 643 | - id: '930' 644 | steps: 645 | - id: '930.1' 646 | setup: 647 | watchers: 648 | - ../.bash_history 649 | - id: '940' 650 | steps: 651 | - id: '940.1' 652 | setup: 653 | watchers: 654 | - ../.bash_history 655 | - id: '950' 656 | steps: 657 | - id: '950.1' 658 | setup: 659 | watchers: 660 | - ../.bash_history 661 | - id: '960' 662 | steps: 663 | - id: '960.1' 664 | setup: 665 | watchers: 666 | - ../.bash_history 667 | - id: '965' 668 | steps: 669 | - id: '965.1' 670 | setup: 671 | watchers: 672 | - ../.bash_history 673 | - id: '970' 674 | steps: 675 | - id: '970.1' 676 | setup: 677 | watchers: 678 | - ../.bash_history 679 | - id: '980' 680 | steps: 681 | - id: '980.1' 682 | setup: 683 | watchers: 684 | - ../.bash_history 685 | - id: '990' 686 | steps: 687 | - id: '990.1' 688 | setup: 689 | watchers: 690 | - ../.bash_history 691 | - id: '1000' 692 | steps: 693 | - id: '1000.1' 694 | setup: 695 | watchers: 696 | - ../.bash_history 697 | - id: '1010' 698 | steps: 699 | - id: '1010.1' 700 | setup: 701 | watchers: 702 | - ../.bash_history 703 | - id: '1020' 704 | steps: 705 | - id: '1020.1' 706 | setup: 707 | watchers: 708 | - ./translate.sh 709 | - id: '1030' 710 | steps: 711 | - id: '1030.1' 712 | setup: 713 | watchers: 714 | - ./translate.sh 715 | - id: '1040' 716 | steps: 717 | - id: '1040.1' 718 | setup: 719 | watchers: 720 | - ./translate.sh 721 | - id: '1050' 722 | steps: 723 | - id: '1050.1' 724 | setup: 725 | watchers: 726 | - ../.bash_history 727 | - id: '1060' 728 | steps: 729 | - id: '1060.1' 730 | setup: 731 | watchers: 732 | - ../.bash_history 733 | - id: '1070' 734 | steps: 735 | - id: '1070.1' 736 | setup: 737 | watchers: 738 | - ../.bash_history 739 | - id: '1080' 740 | steps: 741 | - id: '1080.1' 742 | setup: 743 | watchers: 744 | - ./translate.sh 745 | - id: '1090' 746 | steps: 747 | - id: '1090.1' 748 | setup: 749 | watchers: 750 | - ../.bash_history 751 | - id: '1100' 752 | steps: 753 | - id: '1100.1' 754 | setup: 755 | watchers: 756 | - ../.bash_history 757 | - id: '1110' 758 | steps: 759 | - id: '1110.1' 760 | setup: 761 | watchers: 762 | - ../.bash_history 763 | - id: '1120' 764 | steps: 765 | - id: '1120.1' 766 | setup: 767 | watchers: 768 | - ./translate.sh 769 | - id: '1130' 770 | steps: 771 | - id: '1130.1' 772 | setup: 773 | watchers: 774 | - ../.bash_history 775 | - id: '1135' 776 | steps: 777 | - id: '1135.1' 778 | setup: 779 | watchers: 780 | - ../.bash_history 781 | - id: '1140' 782 | steps: 783 | - id: '1140.1' 784 | setup: 785 | watchers: 786 | - ./translate.sh 787 | - id: '1150' 788 | steps: 789 | - id: '1150.1' 790 | setup: 791 | watchers: 792 | - ../.bash_history 793 | - id: '1160' 794 | steps: 795 | - id: '1160.1' 796 | setup: 797 | watchers: 798 | - ../.bash_history 799 | - id: '1170' 800 | steps: 801 | - id: '1170.1' 802 | setup: 803 | watchers: 804 | - ./translate.sh 805 | - id: '1180' 806 | steps: 807 | - id: '1180.1' 808 | setup: 809 | watchers: 810 | - ../.bash_history 811 | - id: '1190' 812 | steps: 813 | - id: '1190.1' 814 | setup: 815 | watchers: 816 | - ./translate.sh 817 | - id: '1200' 818 | steps: 819 | - id: '1200.1' 820 | setup: 821 | watchers: 822 | - ../.bash_history 823 | - id: '1210' 824 | steps: 825 | - id: '1210.1' 826 | setup: 827 | watchers: 828 | - ../.bash_history 829 | - id: '1220' 830 | steps: 831 | - id: '1220.1' 832 | setup: 833 | watchers: 834 | - ../.bash_history 835 | - id: '1230' 836 | steps: 837 | - id: '1230.1' 838 | setup: 839 | watchers: 840 | - ../.bash_history 841 | - id: '1240' 842 | steps: 843 | - id: '1240.1' 844 | setup: 845 | watchers: 846 | - ../.bash_history 847 | - id: '1250' 848 | steps: 849 | - id: '1250.1' 850 | setup: 851 | watchers: 852 | - ../.bash_history 853 | - id: '1260' 854 | steps: 855 | - id: '1260.1' 856 | setup: 857 | watchers: 858 | - ../.bash_history 859 | - id: '1270' 860 | steps: 861 | - id: '1270.1' 862 | setup: 863 | watchers: 864 | - ../.bash_history 865 | - id: '1280' 866 | steps: 867 | - id: '1280.1' 868 | setup: 869 | watchers: 870 | - ../.bash_history 871 | - id: '1290' 872 | steps: 873 | - id: '1290.1' 874 | setup: 875 | watchers: 876 | - ../.bash_history 877 | - id: '1300' 878 | steps: 879 | - id: '1300.1' 880 | setup: 881 | watchers: 882 | - ../.bash_history 883 | --------------------------------------------------------------------------------