Skip to content

Instantly share code, notes, and snippets.

@kunst1080
Created February 3, 2014 14:19
Show Gist options
  • Select an option

  • Save kunst1080/8784620 to your computer and use it in GitHub Desktop.

Select an option

Save kunst1080/8784620 to your computer and use it in GitHub Desktop.
xargs like command on cmd.exe
@echo off
if "%~1"=="" goto :USAGE
:MAIN
set COMMAND=%*
for /f "usebackq tokens=*" %%o in (`findstr .*`) do (
call %%COMMAND:?=%%o%%
)
goto :eof
:USAGE
echo 標準入力の各行に対し、コマンドを発行します
echo each コマンド
echo ※標準入力は変数?となります
goto :eof
@goyercin

Copy link
Copy Markdown

hello

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