@echo off
setlocal enabledelayedexpansion
set string=Uzun bir cumle
set find=Uzun
set replace=Kisa
call set string=%%string:!find!=!replace!%%
echo %string%
Output = Kisa bir cumle
Unix, Linux, JBoss, Websphere, Ant, Python, Oracle DB, Arduino, Raspberry Pi.
20 Kasım 2017 Pazartesi
Batch - String'den silme
@echo off
set string=Uzun bir cumle
set string=%string:Uzun=%
echo %string%
Output = bir cumle
set string=Uzun bir cumle
set string=%string:Uzun=%
echo %string%
Output = bir cumle
Batch - Dosya ismindeki uzantıyı silmek
@echo off
for /R "C:\Path" %%f in (*.txt) do (
echo %%~nf
)
pause
for /R "C:\Path" %%f in (*.txt) do (
echo %%~nf
)
pause
Bash - Dosyanın her satırına string prepend etmek
for /f "tokens=*" %a in (input.txt) do (echo oncul_metin.%a) >> output.txt
13 Kasım 2017 Pazartesi
10 Kasım 2017 Cuma
Batch - Komut satırı argümanlarını kullanmak
echo off
set arg1=%1
set arg2=%2
echo arguman1: %arg1%
echo arguman2: %arg2%
set arg1=%1
set arg2=%2
echo arguman1: %arg1%
echo arguman2: %arg2%
Kaydol:
Kayıtlar (Atom)