Skip to content

Instantly share code, notes, and snippets.

@sipadan2003
Last active November 11, 2019 05:43
Show Gist options
  • Save sipadan2003/ac05c7b4aa00df647c48c97f3e2226d8 to your computer and use it in GitHub Desktop.
Save sipadan2003/ac05c7b4aa00df647c48c97f3e2226d8 to your computer and use it in GitHub Desktop.
ShellScript samples
#!/bin/bash
for i in `grep -E "^[0-9]+$" d.txt`
do
echo "Processing for $i"
rm -f $i.txt
for j in `grep -E "^[^:]+:$i" d.txt`
do
echo $j >> $i.txt
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment