bash-hackers-wiki/docs/snipplets
Hanson Char e966036f05 Fix hyperlinks of markdown pages at depth 2
find docs/ -depth 2  -name '*.md' | xargs grep '(.*/' -l | \
  xargs -I{} \
  sed -i '' \
  -e 's%(/\([^/#).][^/#).]*\)/\([^/#).][^/#).]*\)\(.md\)\{0\})%(../\1/\2.md)%g' \
  -e 's%(/\([^/#).][^/#).]*\)/\([^/#).][^/#).]*\)#\([0-9a-zA-Z_-][0-9a-zA-Z_-]*\))%(../\1/\2.md#\3)%g' \
  -e 's%(/\([^/#).][^/#).]*\)/\([^/#).][^/#).]*\)/\([^/#).][^/#).]*\)\(.md\)\{0\})%(../\1/\2/\3.md)%g' \
  -e 's%(/\([^/#).][^/#).]*\)/\([^/#).][^/#).]*\)/\([^/#).][^/#).]*\)#\([0-9a-zA-Z_-][0-9a-zA-Z_-]*\))%(../\1/\2/\3.md#\4)%g' \
  -e 's%](\([^:.>)#][^:.>)#]*\))%](../\1.md)%g' \
  -e 's%](\([^:.>)#][^:.>)#]*\)#\([^:.>)#][^:.>)#]*\))%](../\1.md#\2)%g' \
  {}

Related to https://github.com/flokoe/bash-hackers-wiki/issues/10
2024-01-28 17:26:10 -08:00
..
add_color_to_your_scripts.md Fix hyperlinks of markdown pages at depth 2 2024-01-28 17:26:10 -08:00
awkcsv.md Convert snipplets to Markdown 2023-07-05 11:33:45 +02:00
filesize.md Convert snipplets to Markdown 2023-07-05 11:33:45 +02:00
index.md Convert snipplets to Markdown 2023-07-04 13:56:41 +02:00
kill_bg_job_without_message.md Convert snipplets to Markdown 2023-07-05 11:33:45 +02:00
largestfile.md Convert snipplets to Markdown 2023-07-05 11:33:45 +02:00
pause_command.md Fix hyperlinks of markdown pages at depth 2 2024-01-28 17:26:10 -08:00
prargs.md Fix hyperlinks of markdown pages at depth 2 2024-01-28 17:26:10 -08:00
print_horizontal_line.md Fix hyperlinks of markdown pages at depth 2 2024-01-28 17:26:10 -08:00
rndstr.md Fix hyperlinks of markdown pages at depth 2 2024-01-28 17:26:10 -08:00
screen_saverestore.md Convert snipplets to Markdown 2023-07-05 11:33:45 +02:00
ssh_fetchkeys.md Convert snipplets to Markdown 2023-07-05 11:33:45 +02:00
ssh_local_var.md Convert snipplets to Markdown 2023-07-05 11:33:45 +02:00
wrapperargs.md Fix hyperlinks of markdown pages at depth 2 2024-01-28 17:26:10 -08:00
xclip.md Convert snipplets to Markdown 2023-07-05 11:33:45 +02:00