Skip to content

Instantly share code, notes, and snippets.

@yspkm
Last active May 1, 2023 06:40
Show Gist options
  • Save yspkm/1f56107dd32402079ab1500b599309ac to your computer and use it in GitHub Desktop.
Save yspkm/1f56107dd32402079ab1500b599309ac to your computer and use it in GitHub Desktop.
N개의 넘버링된 파일에 대한 명령 실행 및 stdout에 출력하는 seq문
seq <개수> | xargs -I % 명령어 <file명_넘버링은 %>.<식별자>
@yspkm
Copy link
Author

yspkm commented May 1, 2023

e. g.
ex1.py: print("ex1.py print")
ex2.py: print("ex2.py print")

$ seq 2 | xargs -I % python ex%.py
ex1.py print
ex2.py print

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