Skip to content

Commit

Permalink
Update documents
Browse files Browse the repository at this point in the history
  • Loading branch information
hahwul committed Apr 26, 2022
1 parent 1fc8635 commit 97cadd5
Show file tree
Hide file tree
Showing 9 changed files with 110 additions and 28 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@

# Dependency directories (remove the comment below to include it)
# vendor/

# Docs
_site
.jekyll-cache
12 changes: 6 additions & 6 deletions docs/install/homebrew.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ nav_order: 2

## Install homebrew
Homebrew is the package manager for MacOS(or linux). On devices using homebrew, you can easily install/update using the brew command.
```
/bin/bash -c "▶(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
```shell
/bin/bash -c "▶(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
```

## Install using homebrew
```
brew tap hahwul/gee
brew install gee
## Install GEE
```shell
brew tap hahwul/gee
brew install gee
```
8 changes: 4 additions & 4 deletions docs/install/source.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ nav_order: 1

## install using go-get
```
▶ GO111MODULE=on go get -v github.com/hahwul/gee
go install github.com/hahwul/gee@latest
```

## install using build project
Clone this repository
```
git clone https://github.com/hahwul/gee
cd gee
git clone https://github.com/hahwul/gee
cd gee
```

Build and install
```
go install
go install
```
17 changes: 17 additions & 0 deletions docs/tips/chunked.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: Chunked
parent: Tips
has_children: false
nav_order: 3
---
`-chunked` flag is Specify the maximum length of the file and save it in multiple files.

```
▶ wc -l http.txt
2278
▶ cat http.txt | gee -chunked 500 output
```

## References
- https://twitter.com/hahwul/status/1360495565633540097
17 changes: 17 additions & 0 deletions docs/tips/distribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: Distribute
parent: Tips
has_children: false
nav_order: 4
---
`-distribute` flag is each line sequentially to multiple files.

```
▶ wc -l http.txt
2278
▶ cat http.txt | gee -distribute alice.txt bob.txt charlie.txt
```

## References
- https://twitter.com/hahwul/status/1360495570922704897
14 changes: 14 additions & 0 deletions docs/tips/find_replace.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Find and Replace
parent: Tips
has_children: false
nav_order: 2
---

```
▶ cat raw.txt | gee -find keep-alive
▶ cat raw.txt | gee -find keep-alive -replace close
```

## References
- https://twitter.com/hahwul/status/1360495560843689989
16 changes: 16 additions & 0 deletions docs/tips/prefix_suffix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: Prefix and Suffix
parent: Tips
has_children: false
nav_order: 1
---

```
▶ cat urls | gee -prefix "curl -i -k " -suffix " -H 'Auth: abcd'" curls.sh
```

```
curl -i -k https://www.hahwul.com/?q=123 -H 'Auth: abcd'
curl -i -k http://testphp.vulnweb.com/listproducts.php?cat=asdf&ff=1 -H 'Auth: abcd'
curl -i -k https://xss-game.appspot.com/level1/frame -H 'Auth: abcd'
```
7 changes: 7 additions & 0 deletions docs/tips/tips.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: Tips
has_children: true
nav_order: 4
---

## Tips
43 changes: 25 additions & 18 deletions docs/usage/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ nav_order: 3
▶ gee [flags] [file1] [file2] ...
```


## Flags
```
▶ ~/go/bin/gee -h (if you install from source)
Expand All @@ -22,37 +21,45 @@ Usage: ./gee [flags] [file1] [file2] ...
Flags:
-append
Append mode for files
Append mode for files
-chunked int
Chuked files from line (e.g output / output_1 / output_2)
Chuked files from line (e.g output / output_1 / output_2)
-debug
Show debug message!
Show debug message!
-distribute
Distribution to files
Distribution to files
-find string
Find string in line (colorize red)
Find string in line (colorize red)
-format string
Change output format (json, md-table, html-table) (default "line")
Change output format (json, md-table, html-table) (default "line")
-grep string
Greping with Regular Expression (like grep)
Greping with Regular Expression (like grep)
-grepv string
Inverse greping with Regular Expression (like grep -v)
Inverse greping with Regular Expression (like grep -v)
-inject string
Inject stdin into the format of the factor value (e.g: -inject='This is %%INJECT%% line!')
-prefix string
Prefix string
Prefix string
-replace string
Replace string in line with '-find' option
Replace string in line with '-find' option
-reverse
Reverse string in line
-rmnl
Remove newline(\r\n)
Remove newline(\r\n)
-split string
Split string within line. (to line , to table, to md-table)
Split string within line. (to line , to table, to md-table)
-suffix string
Suffix string
Suffix string
-uncolor
Uncolorize stdout
Uncolorize stdout
-uniq
Remove duplicated line
-version
Version of gee
Version of gee
-with-lc
With letters count (colorize magenta)
-with-line
With line number (colorize blue)
With line number (colorize blue)
-with-time
With timestamp (colorize green)
With timestamp (colorize green)
```

0 comments on commit 97cadd5

Please sign in to comment.