General :: How To Program The Command Line To Run A Piece Of Code Multiple Time

Dec 4, 2010

So, I usually write/find a test case generator for any code that I write. This type of code generally leads to some file output. To be thorough, I try and generate many different files to test my code on.

Say the command is like this:

Is there a way to automate this for many different values of the parameters and generate many different files?

I tried:

I wasn't able to use the $i in the filename, and without it the command gave me no errors, but did nothing else either. I know the Unix command line is very powerful, and I have a feeling that this should be possible, but I just don't know how to do it.

View 3 Replies


ADVERTISEMENT

Software :: Program To Hibernate The Computer For A Set Time (from Command Line)?

May 9, 2011

Is there a program I can install and run from the Command Line that will hibernate the computer (pausing all running programs (like my Minecraft server)), cutting power usage TO A BARE MINIMUM, and the un-hibernate after a set time? The laptop this will be used on is SliTaz linux with the GUI disabled (unless i run startx)

View 3 Replies View Related

General :: Download Scheduler Program Code Which Creates Multiple Threads Of The Downloading Process?

Apr 30, 2010

I have created a simple download schedular with source-code give below :

---------------------record_strokes.sh-------------------
touch /home/student/packs/lynx/logfile
lynx -cmd_log /home/student/packs/lynx/logfile

[code]....

View 1 Replies View Related

General :: Check DVD Region Code From Command Line?

May 3, 2010

Is there a way to get DVD region code from command line (linux/ubuntu 9.10)? I want to script this action and store the region code (and other data about DVD) in a log.

I am looking for the info about media, not the drive.

View 1 Replies View Related

General :: Converting C Code Into Command Line Executable?

Sep 1, 2010

I thought this question's best category would be in the newbie sectionBasically I have a C code, (for simplicity is only prints a few lines), called printx.c that I would like to convert into a binary file so whenever I have to type "printx" in the command line it would execute the programofcourse gcc will give me a binary file if I do a "gcc printx.c", but even the output file (e.g. print.outwould have to be executed following manner./print.outI only ask, because I notice programs like mailx (which is written in C) is a binary file that could be run in this manner (at least that's what I notice on my ubuntu distro)

View 3 Replies View Related

General :: How To Get Source Code Of Web Page From Command Line?

May 6, 2010

I'm trying to get the source code of a web page from linux command line and save it to a file. I googled for it but didn't get any info. I'm not sure if wget can do this.

View 4 Replies View Related

General :: Multiple Lines At The Command Line?

Feb 22, 2011

I've seen a few tutorials that have commands and parameters on multiple line, like the one below:

Code:
chkconfig --levels 235 mysqld on
/etc/init.d/mysqld start

I can copy and paste this in Putty, but what if I want to manually type it? If I press return, the first line gets processed, so how do I insert a new line?

View 4 Replies View Related

General :: Set Internet Time From Command Line?

Sep 2, 2009

how do I set the internet time from the command line?how to make a linux machine the time server within the domain?

View 1 Replies View Related

General :: Command-line On Multiple Monitors, ScreenWM?

Mar 26, 2010

I have an older computer with Arch installed that I want to use to accomplish most of my daily tasks using the command-line (Mailgrab, IRSSI, mpg123, Elinks, Vi, etc). I realize that there are many lightweight WMs out there that support multiple monitors, but it'd be nice if I could just use Screen or something to that effect to distribute my windows across two or three displays.

View 1 Replies View Related

General :: Inserting Multiple Files To Mysql On Command Line?

Mar 5, 2011

I am using ubuntu and mysql.I have a list of many .sql files, like 1.sql, 2.sql, 3.sql ... 100000.sqlI need to insert them into the database mysql mydb < *.sqlGives me: -bash: *.sql: ambiguous redirect

View 2 Replies View Related

General :: See All Installed Program In Ubuntu From Command Line?

Jun 16, 2010

How can I see all my installed program in Ubuntu from command line?

View 2 Replies View Related

General :: Scroll One Page At A Time In Linux At The Command Line?

Oct 12, 2010

In windows, you could do a dir | more to scroll one page a time.How does one do this in Linux?

View 2 Replies View Related

General :: Making Multiple Duplicate File Copies Using Cp On Command Line?

Jul 21, 2011

I want to take a graphics file and make 10 copies of it to the same directory, each with 001, 002, or some such designation at the end of each file name so they have discrete files names. Is this possible using cp?

View 12 Replies View Related

General :: Ubuntu - Command-line Program That Switches Consoles?

Jun 18, 2011

For whatever reason, the "Ctrl-Alt-Fn" sequence has no effect on one of my Ubuntu machines; the sequence is interpreted as ordinary input. I need to get the system to a console because I'm trying to do a dist-upgrade and that's going to bounce gdm etc.

Is there some command-line tool that can be used to switch consoles? I have some vague distant memory of that being possible.

(I'm running Ubunty Jaunty at the moment. Yes I know it's old; I'm trying to march forward.)

View 2 Replies View Related

General :: High Level Command Line Program For Burning CDs And DVDs?

Mar 12, 2010

I'm sick of screwing around trying to script a clean solution to burn multiple files and folders to CDs and DVDs with wodim, growisofs and genisoimage.I'm looking for a high level command line program that uses sensible defaults and takes arguments something like this:[program-name] [cd|dvd] /path/to/dir1/ /path/to/dir2/ /path/to/file ...It should then do all the low level copying and ISO generation transparently and just burn the damn disk!Does anyone have any suggestions? I've looked at several programs but it seems there are too many choices to trawl through and not enough information about them online.

View 4 Replies View Related

General :: CentOS Command-line Program To Randomly Change MAC Address?

Nov 7, 2009

OS: CentOS 5.3 Enterprise Server
Red Hat Nash Version 5.1.19.6

I need to find a command-line program to randomly change my MAC address. I know on Ubuntu there is a program called 'macchanger'. And on Windows another one called 'macshift'. I just can't find one for CentOS 5.3 Enterprise Edition.

View 3 Replies View Related

Programming :: Removing Left Recursion - Construct An AST From It By Executing A Piece Of Code For Every Nonterminal Matched?

Apr 7, 2011

I'm still a but confused about the standard way of removing it for left-associative operators: [URL] Especially about how to construct an AST from it by executing a peice of code for every nonterminal matched. And I'm still not totally convinced that it will be left-associative, I just barely understand it. Also, how would you remove left-recursion for something like this:

Code:
expr ::= expr "(" param_list ")"
| other stuff...?

View 8 Replies View Related

General :: Free Command Line Tool Time Which Can Be Used To Find Timing Statistics For Various Commands?

Jun 24, 2011

I'd like to measure network latency for SNMP GET request. There is a free command line tool time which can be used to find timing statistics for various commands. For example it can be used with snmpget in the following way:$ time snmpget -v 2c -c public 192.168.1.3 .1.3.6.1.2.1.2.2.1.10.2IF-MIB::ifInOctets.2 = Counter32: 112857973real 0m0.162suser 0m0.069ssys 0m0.005sAccording to the manual, statistics conists of:

the elapsed real time between
invocation and termination,
the user CPU time (the sum of the

[code]....

View 3 Replies View Related

Programming :: How To Get Source Code Of Command Line?

Jan 23, 2009

I just want to see how the command line such as : "cat", "split", "ls"...ect source code ? Are they written in C or other language ? I don't know where to search those?

View 6 Replies View Related

General :: Command Line - Unix - Program That Can Handle All Popular Compression/archiving Formats - E.g.tar, Gzip, Bzip2, Zip?

Jun 22, 2011

I sometimes get confused by the varying command line options I need to run common Unix archiving and compression software (e.g. gzip, bzip2, zip, tar).

Is there a program out there that can just Do What I Mean for common cases? For example:

View 2 Replies View Related

Fedora :: Open A File Using Command Line In Terminal And Edit Code Within It?

Jun 10, 2011

How to open a file using command line in terminal and edit the code within it ?code...

View 6 Replies View Related

Server :: Mysqldump Export Type Update / Command Line Or By A Simple PHP Code?

Jan 2, 2011

I noticed in phpmyadmin that we can export a database in type update. Indeed we have update... in place of insert.... is there anyone know if it possible by a command line or by a simple PHP code ?

View 1 Replies View Related

Ubuntu :: Box To Run A Command Line Program?

Sep 19, 2010

I have just installed pdfocr. Unfortunately it does not have a gui and so in time I will forget how to use it or not remember I have it.

Is there a simple generic program that will browse to where the file is and then run the command line? I suspect python will do it. Could someone point me to a suitable tutorial for this purpose.code...

View 2 Replies View Related

Ubuntu :: What Command Line Program Should Be Used

Jul 6, 2011

I am going to do a web based search for several thousand webpages which may or may not exist. I just want a list of the addresses which work. I dont want to load into firefox, and I'd preffer not to ping the url. I just want to test the URLs for validity and kick back a list of good URLs.
Any Ideas on a simple program to do this, which I can use in a bash script?

View 2 Replies View Related

General :: ImageMagick's "import" Command Line Program Failing To Take A Screenshot From CRON Script

Feb 16, 2011

I wrote a simple command line script which is suppose to take my screenshot every 5 minutes.(using ImageMagick's "import" program)

Here is the script (shottr.sh):

This is working fine if I execute by hand i.e:

The script itself is being executed (I hear a voice saying: "Screenshot") but the actual screenshot is not taken.

Be assured that it is NOT permission issue (I placed a simple "touch" invocation and file was created)

May be if it's run from cron...it doesn't have a "window" so it can't take a screenshot from nowhere? If that is the case, then how can I workaround it?

View 1 Replies View Related

Ubuntu :: Change Time From Command Line?

May 15, 2011

I decided to install Chromium OS to my dad's netbook, and it works perfectly. The only problem is that i can't change the time. Luckily, I can access a command line by pressing CTRL+ALT+T. So maybe I can change it from the command line.

View 5 Replies View Related

Debian :: Multiple Commands Displayed On A Command Line?

May 21, 2011

I am trying to get 2 things to operate on the same line, for example echo Current Version: [cat /file/ver.txt] is there a way to do this?

View 1 Replies View Related

Ubuntu :: Find Multiple Files In The Command Line?

Mar 2, 2010

command line, I have a server for work that I ssh into and I need to be able to find multiple files (they have the leading text just the date identifier changes) and then zip the files (with bzip) them and then finally scp(Secure copy) them to another server.

These files are always in the same directory and this is a daily task and just want to make into a script that I run once I am logged into the remote server.

View 4 Replies View Related

Ubuntu :: Use Multiple Cut Command To Print Output On A Line?

Apr 27, 2010

how to use multiple linux cut comman to display on same line ?

e.g ls -il | cut -f6 d:
ls - il cut -f9 -d:

The linux script output is

filename
123

How to use cut to display on same line ?

View 1 Replies View Related

Ubuntu :: Move Multiple Files Via Command Line?

Sep 15, 2010

I liked the idea of the "cosmos" screensaver/desktop, but wanted to add my own pictures to the application. I navigated to /usr/share/backgrounds/cosmos and tried to drag and drop. I quickly found that I did not have permission to do this.

I googled my problem and found some command line tutorials telling me to sudo cp. My problem is that I have about 30 pics that I want to move in there, and I don't think I can just move the directory, they have to be in that folder as the pictures themselves.

I don't really feel like typing the cp line multiple times with multiple randomly named image files.

Is there a way to have the command line cp all of my files from one directory to another?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved