Unix

Listening port number

lsof -n -i4TCP:4000 | grep LISTEN

How to list file contents of directory

output1.sh

find . -maxdepth 1 -type f -not -path '*/\.*' | sed 's/^\.\///g' | sort

$ cd /dir/with/images
$ output1.sh > output.txt

output2.sh
sed 's/^/xxx/; s/$/)/' output.txt

Search and replace 'xxx' with '![](images/3-coffee/'

xxx3-finder.png)
xxx4-new-project.png)
xxx5-defaults.png)
xxx6-darkmode.png)

https://unix.stackexchange.com/questions/434611/add-prefix-and-suffix-to-every-line-in-a-txt-file

%d bloggers like this: