Sponsored Content
Full Discussion: Giving input to a c++ file
Top Forums Shell Programming and Scripting Giving input to a c++ file Post 302141803 by jim mcnamara on Monday 22nd of October 2007 12:42:17 PM
Old 10-22-2007
Have the C++ program read from stdin. ie., cin
One way to do it:
Code:
for i in 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000
do
      echo "$i" | myprogram
done

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Backup is giving me input/output error

I've been successfully running a daily cron script to backup certain things on my server but just recently I started getting input/output errors for everything. For each directory the script tries to backup I now get this: cp: accessing `/mnt/backup/**dir**/': Input/output error (8 Replies)
Discussion started by: JPigford
8 Replies

2. Shell Programming and Scripting

Giving "read" from standard input a timeout.

I want to prompt a user for input but I want it to timeout after a specified time if no response is given. I tried the sleep command but this does not work. I am using ksh. Thanks. (10 Replies)
Discussion started by: rello
10 Replies

3. Shell Programming and Scripting

Giving input through script

Script 1.ksh ========= /home/adw/a.ksh << ** a b Script 1.ksh is working fine even without ending "**" Script 2.ksh ========= if then /home/adw/a.ksh << ** a b fi But the script 2.ksh is giving error "syntax error : `<<' unmatched". Is it bcoz of fi. (1 Reply)
Discussion started by: radhika03
1 Replies

4. Shell Programming and Scripting

Giving input to a script through a script

/home/adw/a.ksh << EOF a b EOF This is how we give input to a file through script Our client has done the coding in a different way :- /home/adw/a.ksh << ** a b Can nybody pls tell me the significance of ** (7 Replies)
Discussion started by: radhika03
7 Replies

5. UNIX for Dummies Questions & Answers

AWK command giving wrong input

Hi all, I have a problem with qwk command. i have to check process status and for that i am using command prstat -mvL 1 1 and it gives me the entire output but when i use this command with awk like this: prstat -mvL 1 1 | awk -F" " '{print $1,$15}' to get first and 15th arguments. ... (3 Replies)
Discussion started by: usha rao
3 Replies

6. Shell Programming and Scripting

giving input to a python wch has been called frm shell script....urgent

i'm calling a python script from shell script. the python needs Y as an input everytime. how can i giv it thru shell script. I tried below code for arg in `cat erd_gen_list.lst` do generateErdSql.py -S $arg << Y done This is giving me err : `<<' unmatched pls help. (1 Reply)
Discussion started by: vini
1 Replies

7. Shell Programming and Scripting

Need script to take input from file, match on it in file 2 and input data

All, I am trying to figure out a script to run in windows that will allow me to match on First column in file1 to 8th Column in File2 then Insert file1 column2 to file2 column4 then create a new file. File1: 12345 Sam 12346 Bob 12347 Bill File2:... (1 Reply)
Discussion started by: darkoth
1 Replies

8. Shell Programming and Scripting

Giving automatic multiple Input to a tool from shell script

Hi, Please help me,its urgent. I have a tool that i want to run from a shell script. When we run the tool it will ask the user choice to add or delete. When user enter the choice it will then ask how many units he want to delete or add and will add or delete accordingly. Now I want to... (1 Reply)
Discussion started by: saket18@ymail.c
1 Replies

9. Shell Programming and Scripting

Giving Input in a script

Hi, I am a newbie to scripting. I want to know something..Is there any way that I can do this? Here is the thing.. there are so many printer queues in which i need to change a certain option.. am using the hppi utility and i need to modify the printer configuration individually going to each... (3 Replies)
Discussion started by: aksijain
3 Replies

10. Shell Programming and Scripting

giving input without manual intervention

Hi all, I am looking for a specific requirement. I am trying to create a wrapper over a set of shell scripts. Some shell scripts wait for user inputs. These inputs may not be same format. And will be spread across multiple files. In short a set of scripts are going to be run on another set... (1 Reply)
Discussion started by: krk1729
1 Replies
TWE(4)							   BSD Kernel Interfaces Manual 						    TWE(4)

NAME
twe -- 3ware 5000/6000/7000/8000 series PATA/SATA RAID adapter driver SYNOPSIS
To compile this driver into the kernel, place the following lines in your kernel configuration file: device pci device twe Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5): twe_load="YES" DESCRIPTION
The twe driver provides support for AMCC's 3ware 5000/6000/7000/8000 series PATA/SATA RAID adapters. These adapters were formerly known as ``3ware Escalade''. These devices support 2, 4, 8, or 12 ATA disk drives and provide RAID0 (striping) and RAID1 (mirroring) functionality. HARDWARE
The twe driver supports the following PATA/SATA RAID controllers: o AMCC's 3ware 5000 series o AMCC's 3ware 6000 series o AMCC's 3ware 7000-2 o AMCC's 3ware 7006-2 o AMCC's 3ware 7500-4LP o AMCC's 3ware 7500-8 o AMCC's 3ware 7500-12 o AMCC's 3ware 7506-4LP o AMCC's 3ware 7506-8 o AMCC's 3ware 7506-12 o AMCC's 3ware 8006-2LP o AMCC's 3ware 8500-4LP o AMCC's 3ware 8500-8 o AMCC's 3ware 8500-12 o AMCC's 3ware 8506-4LP o AMCC's 3ware 8506-8 o AMCC's 3ware 8506-8MI o AMCC's 3ware 8506-12 o AMCC's 3ware 8506-12MI DIAGNOSTICS
Controller initialisation phase twe%d: microcontroller not ready The controller's onboard CPU is not reporting that it is ready; this may be due to either a board or system failure. Initialisation has failed. twe%d: no attention interrupt twe%d: can't drain AEN queue twe%d: reset not reported twe%d: controller errors detected twe%d: can't drain response queue twe%d: reset %d failed, trying again The controller is not responding correctly to the driver's attempts to reset and initialise it. This process is retried several times. twe%d: can't initialise controller, giving up Several attempts to reset and initialise the controller have failed; initialisation has failed and the driver will not attach to this con- troller. Driver initialisation/shutdown phase twe%d: register window not available twe%d: can't allocate register window twe%d: can't allocate parent DMA tag twe%d: can't allocate interrupt twe%d: can't set up interrupt twe%d: can't establish configuration hook A resource allocation error occurred while initialising the driver; initialisation has failed and the driver will not attach to this con- troller. twe%d: can't detect attached units Fetching the list of attached units failed; initialisation has failed. twe%d: error fetching capacity for unit %d twe%d: error fetching state for unit %d twe%d: error fetching descriptor size for unit %d twe%d: error fetching descriptor for unit %d twe%d: device_add_child failed twe%d: bus_generic_attach returned %d Creation of the disk devices failed, either due to communication problems with the adapter or due to resource shortage; attachment of one or more units may have been aborted. Operational phase twe%d: command completed - %s A command was reported completed with a warning by the controller. The warning may be one of: redundant/inconsequential request ignored failed to write zeroes to LBA 0 failed to profile TwinStor zones twe%d: command failed - %s A command was reported as failed by the controller. The failure message may be one of: aborted due to system command or reconfiguration aborted access error access violation device failure controller error timed out invalid unit number unit not available undefined opcode request incompatible with unit invalid request firmware error, reset requested The command will be returned to the operating system after a fatal error. twe%d: command failed submission - controller wedged A command could not be delivered to the controller because the controller is unresponsive. twe%d: AEN: <%s> The controller has reported a change in status using an AEN (Asynchronous Event Notification). The following AENs may be reported: queue empty soft reset degraded mirror controller error rebuild fail rebuild done incomplete unit initialisation done unclean shutdown detected drive timeout drive error rebuild started aen queue full AENs are also queued internally for use by management tools. twe%d: error polling for signalled AENs The controller has reported that one or more status messages are ready for the driver, but attempting to fetch one of these has returned an error. twe%d: AEN queue overflow, lost AEN <%s> A status message was retrieved from the controller, but there is no more room to queue it in the driver. The message is lost (but will be printed to the console). twe%d: missing expected status bits %s twe%d: unexpected status bits %s A check of the controller's status bits indicates an unexpected condition. twe%d: host interrupt The controller has signalled a host interrupt. This serves an unknown purpose and is ignored. twe%d: command interrupt The controller has signalled a command interrupt. This is not used, and will be disabled. twe%d: controller reset in progress... The controller is being reset by the driver. Typically this is done when the driver has determined that the controller is in an unrecover- able state. twe%d: can't reset controller, giving up The driver has given up on resetting the controller. No further I/O will be handled. controller reset done, %d commands restarted The controller was successfully reset, and outstanding commands were restarted. AUTHORS
The twe driver and manual page were written by Michael Smith <msmith@FreeBSD.org>. Extensive work done on the driver by Vinod Kashyap <vkashyap@FreeBSD.org> and Paul Saab <ps@FreeBSD.org>. BUGS
The controller cannot handle I/O transfers that are not aligned to a 512-byte boundary. In order to support raw device access from user- space, the driver will perform alignment fixup on non-aligned data. This process is inefficient, and thus in order to obtain best perfor- mance user-space applications accessing the device should do so with aligned buffers. BSD
August 15, 2004 BSD
All times are GMT -4. The time now is 07:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy