Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
I would like to create multiple empty files using tcsh, similar to the command:
touch {0..999}.txt
no bash installed.
%echo $SHELL %/bin/tcsh
%echo $SHELL
%/bin/tcsh
If possible, not using script but a terminal command
You can use seq's formatting option and avoid the loop by passing multiple args to touch:
seq
touch
touch `seq -f %.0f.txt 1 999`
Add a comment
I've just created a simple script that does it:
file name: script
script
\#!/bin/tcsh set j = 1 while ($j <= 10000) touch $j.txt @ j++ end
changed the permissions for the script to +x :
chmod +x script
and executed :
./script
alias script "touch 'seq -f %.0f.txt 1 999'"
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.