Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
macOS - Operating System
Repeating things in the terminal.
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Kiarocks" data-source="post: 1339076" data-attributes="member: 207768"><p>Ahhh, got it. That was confusing.</p><p>[CODE]#! /bin/bash</p><p></p><p>echo "Ready to crash your computer?"</p><p>read yes</p><p>echo "You entered yes. Why?"</p><p>mkdir ~/Desktop/Files</p><p>cd ~/Desktop/Files</p><p>echo 'How many times?'</p><p>read x</p><p>y=99</p><p>while [ $y -le $x ]</p><p>do</p><p> touch $y.txt</p><p> y=$(( $y + 1 ))</p><p>done[/CODE]Don't put a high number in.</p></blockquote><p></p>
[QUOTE="Kiarocks, post: 1339076, member: 207768"] Ahhh, got it. That was confusing. [CODE]#! /bin/bash echo "Ready to crash your computer?" read yes echo "You entered yes. Why?" mkdir ~/Desktop/Files cd ~/Desktop/Files echo 'How many times?' read x y=99 while [ $y -le $x ] do touch $y.txt y=$(( $y + 1 )) done[/CODE]Don't put a high number in. [/QUOTE]
Verification
Post reply
Forums
Apple Computing Products:
macOS - Operating System
Repeating things in the terminal.
Top