•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Shell Scripting section within the Software Development category of DaniWeb, a massive community of 397,578 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,391 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Shell Scripting advertiser:
Views: 654 | Replies: 1
![]() |
•
•
Join Date: Aug 2007
Posts: 48
Reputation:
Rep Power: 0
Solved Threads: 0
My C++ program creates a nxn matrix with given value. For e.g if the input is 10 it will creates a matrix of 10x10 now what i want is the script should run program and give input values in a variation of 1000. Say first matrix of 1000 then 2000 , 3000 ..... 10000. I tried using for loop but unable to get the correct result. Also the executable is a.out.How should i create a script of this sort
Kindly help...
Kindly help...
•
•
Join Date: Oct 2007
Location: Pennsylvania, US
Posts: 37
Reputation:
Rep Power: 1
Solved Threads: 2
You cloud use the 'yes' command. For example:
Would send the input of 10 to my_program.
bash Syntax (Toggle Plain Text)
#!/bin/bash yes '10' | my_program;
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb Shell Scripting Marketplace
Similar Threads
Other Threads in the Shell Scripting Forum
- Previous Thread: script fails when run via cron
- Next Thread: How I can write shell script for Sending Email


Linear Mode