Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rdnajac committed Sep 25, 2024
1 parent 6ac0643 commit 4395600
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
21 changes: 10 additions & 11 deletions docs/command-line/bash.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Then run it:
```s
./path/to/script.sh
```

> [!TIP]
> The `./` prefix is required to run scripts in the current directory.
Expand Down Expand Up @@ -125,7 +126,7 @@ in bash

A here document allows you to pass multiple lines of input to a command without storing it in a file:

```
```sh
cat << EOF
This is a here document.
It can be used to pass multiple lines of input to a command.
Expand All @@ -134,13 +135,13 @@ EOF

### More useful commands

| Command | Description |
| ------------------------------------- | ----------------------------------------------------------------------------- |
| `ssh user@host 'bash -s' < script.sh` | Run a local script on a remote machine. |
| `md5sum ./*.fastq.gz > md5sums.txt` | Generate a file with the MD5 checksums of all files in the current directory. |
| `md5sum -c md5sums.txt` | Check files against the MD5 checksums in a file. |
| `du -ha --max-depth=1` | Check the total size of each folder in the current directory. |
| `free -h` | Check current memory usage. |
| Command | Description |
| ----------------------------------- | ----------------------------------------------------------------------------- |
| ssh user@host 'bash -s' < script.sh | Run a local script on a remote machine. |
| md5sum ./\*.fastq.gz > md5sums.txt | Generate a file with the MD5 checksums of all files in the current directory. |
| md5sum -c md5sums.txt | Check files against the MD5 checksums in a file. |
| du -ha --max-depth=1 | Check the total size of each folder in the current directory. |
| free -h | Check current memory usage. |

## Loop across files of the same extension

Expand Down Expand Up @@ -196,6 +197,4 @@ myfunc() {
> [!TIP]
> To define single-line functions, add a semicolon before the closing brace:
>
> ```sh
> myfunc() { echo "Hello, world!"; }
> ```
> `myfunc() { echo "Hello, world!"; }`
2 changes: 1 addition & 1 deletion docs/command-line/perl.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ stat localtime caller SPECIAL VARIABLES
12 blcks with EXPR %ENV environment
```
> https://perldoc.perl.org/perlcheat
[Source](https://perldoc.perl.org/perlcheat)
## to run
Expand Down

0 comments on commit 4395600

Please sign in to comment.