xargs
builds the command from the standard input - however, it is not available for Windows command shell... therefore I 've decided to build one and it turns out a Batch script is enough...
Source: https://github.com/DoctorLai/BatchUtils/blob/master/xargs.cmd
@echo off
:: example: git branch | grep -v "develop" | xargs git branch -D
:: example xargs -a input.txt echo
:: https://helloacm.com/simple-xargs-batch-implementation-for-windows/
setlocal enabledelayedexpansion
set args=
set file='more'
:: read from file
if "%1" == "-a" (
if "%2" == "" (
echo Correct Usage: %0 -a Input.txt command
goto end
)
set file=%2
shift
shift
goto start
)
:: read from stdin
set args=%1
shift
:start
if [%1] == [] goto start1
set args=%args% %1
shift
goto start
:start1
for /F "tokens=*" %%a in (!file!) do (
%args% %%a
)
:end
Building command from standard input:
Building command from text file:
Reposted to blog: https://helloacm.com/simple-xargs-batch-implementation-for-windows/
Enjoy and Steem On!
Delegate to @justyy
@justyy runs a automatic delegation service for nearly a year now. Delegate to @justyy for at least 5 SP and start receiving daily payout as interests (from 8% to 10% APR). Also, as a supporter, the delegators will start to receive complimentary/curation upvotes (as a thank you) per day from e.g @justyy and a few other curation trails. For more information, read this. The voting weight algorithm is open source.
- Delegate to @justyy - at least 5 SP to join (automatically)
- Undelegate to @justyy (Quit) - SP returned by steem blockchain in 5 days
- View Current Delegators/Supporters
Please note that the SP you enter is the final amount to delegate. For example, if you already delegate 10 SP and you want to delegate another 5 SP, you will need to enter 15 SP (instead of 5 SP) in the delegation form.
Vote for me or Set me as a witness Proxy - Every vote counts! - Thank you!
Your Vote is much appreciated, and every vote counts.
Check out My Witness Page
Support me and my work as a witness - witness thread by
- voting me here, or
- voting me as a witness proxy - let @justyy represent you.
Thank you! Some of My Contributions: SteemYY.com - SteemIt Tutorials, Robots, Tools and APIs and VPS Search Tool