Skip to content

Instantly share code, notes, and snippets.

@semihozkoroglu
Last active September 25, 2015 23:07
Show Gist options
  • Save semihozkoroglu/999248 to your computer and use it in GitHub Desktop.
Save semihozkoroglu/999248 to your computer and use it in GitHub Desktop.
gerekli kod parçacıkları
rename 's/eski/yeni/' * #bulundugumuz dizinde dosya ismi değiştirmek için.
echo '/tmp/foo/bar/baz.jpeg' | sed -ne 's/\(.*\)\.\(.*\)$/dosya:\1\nuzanti:\2\n/p' # p parametresini kaldırırsak sed'in sesiz kalmasını `-n` paremetresini kaldırmalıyız. `-ne` olmalı `-en` olamıyor
echo '<a href="http:www.google.com">' | sed -ne 's/\(.*\)\:\(.*\)">$/link:\2/p'
echo '10-12-2011' | sed -e 's/\(\d\{2\}\)-\(\d\{2\}\)-\(\d\{4\}\)/\3-\2-\1/'
echo '10-12-2011' | sed -e 's/\([^-]*\)-\(\([^-]*\)-\(.*\)\)$/\4-\3-\1/'
# find in file searched word with recursive
find . -name \*.java -exec grep 'http:/' {} \; >> T
@semihozkoroglu
Copy link
Author

search parçaçığı

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment