Last active
December 19, 2015 04:49
-
-
Save tairov/5900317 to your computer and use it in GitHub Desktop.
useful shell commands, sed replace, mongodb log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
perl -ne '/([0-9a-z]{24,24})/ and print $1, "\n"' 01_07.txt | |
# run command with only 1 argument (-L 1, --max-lines 1) and ask before each command | |
ls -la | xargs --interactive -L 1 echo | |
# substitution in xargs | |
xargs -L 1 -I{} echo "ID IS: {}" | |
sed -i -e s/\,\.\$comment:.\".*\"// mongodb_short_sed.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment