Sponsored Content
Full Discussion: I dont want this
Top Forums Programming I dont want this Post 72112 by blowtorch on Wednesday 18th of May 2005 03:49:28 PM
Old 05-18-2005
C,

This is a sample code that I wrote on a HP-UX 11.11 system. This prints a prompt and takes input. It does not act on the input, except when it receives exit - it exits.

Code:
#include<stdio.h>

int main() {
        char argarray[80];
        while(1) {
                fprintf(stdout,"! ");
                fgets(argarray,80,stdin);
                argarray[strlen(argarray)-1]='\0';
                if(!strcmp(argarray,"exit")){
                        break;
                }
                /*fprintf(stdout,"%s was input.\n",argarray);*/
        }
        exit(0);
}

You can uncomment the fprintf in the end to echo what was input.

Last edited by blowtorch; 05-18-2005 at 04:51 PM.. Reason: clarifications
 

9 More Discussions You Might Find Interesting

1. What is on Your Mind?

dont understand

i'm trying to learn unix and i posted a question and what i was typing from school. i can't figure it out. how am i supposed to learn , when i get shutdown by an admin. for posting a homework question. doesn't make any sense. its a dumb rule. thanks for helping (4 Replies)
Discussion started by: AtomJ22
4 Replies

2. Shell Programming and Scripting

dont't find right regex

I have a string which contains following information: <SZ.T><P ALIGN="CENTER"><FONT FACE="Arial, Helvetica, sans-serif" SIZE="+3">Bundesregierung nimmt sich dicke Deutsche vor</FONT></P></SZ.T> <SZ.UT><P ALIGN="CENTER"><FONT SIZE="+1"><I> Seehofer und Schmidt planen Kampagne gegen... (3 Replies)
Discussion started by: trek
3 Replies

3. UNIX for Dummies Questions & Answers

script dont' break out

I have concurrent manager stop and check to verify all the process are stopped BUT even after all the process are stopped query script continues to run without break out. # stop the concurrent manager $COMMON_TOP/admin/scripts/$CONTEXT_NAME/adstpall.sh $DB_USER/$DB_PSWD # check if the... (1 Reply)
Discussion started by: Paul.S
1 Replies

4. Shell Programming and Scripting

deleting rows that dont have ....

Hi I posted earlier. This is sorta similar but I want to delete rows that dont have R, T, Y or U. Nam1 RTYU Nam2 RRTT Nam3 RYTU Nam4 IRTT So the output would look like this? Nam1 RTYU Nam2 RRTT Nam3 RYTU too many problems thanks (3 Replies)
Discussion started by: kylle345
3 Replies

5. Shell Programming and Scripting

Dont what this sed expression does

I am new to unix and have come across the sed expression but not sure what its doing. Can someone please tell me whats happening in the sed command below? (2 Replies)
Discussion started by: 5211171
2 Replies

6. Shell Programming and Scripting

ls | grep (i dont know what to put here)

Dear users, I googled for a while, but i have got a lot of different answers regarding a simple unix command. lets say there are a lot of files in a directory. How can i list the files in a directory whose file types is "text"? Thank you in advance (4 Replies)
Discussion started by: kevincobain2000
4 Replies

7. Shell Programming and Scripting

i dont know where problem!!

okthanksi solve it :) (1 Reply)
Discussion started by: dream23
1 Replies

8. UNIX for Dummies Questions & Answers

i dont know how to solve this error

can while do make aloop as do while in c language ? (1 Reply)
Discussion started by: teefa
1 Replies

9. Ubuntu

Dont Allow Exitting from a Script

Hello, I wrote a script and disabled Ctrl+C using trap ' ' 2 For security, I cannot allow users to exit the script on their own for then they would have access to the command prompt. Are there any other cases that I need to cover? Thank you. I'm new to scripting. (6 Replies)
Discussion started by: fzivkovi
6 Replies
concordance(1)						      General Commands Manual						    concordance(1)

NAME
concordance - for programming your Logitech Harmony remote control SYNOPSIS
concordance For automatic mode: concordance <file> For manual mode: concordance <options> DESCRIPTION
This software supports programming Logitech Harmony remote controls. This software uses libconcord, which in turn uses libusb, which requires the RAWIO capability. That means you probably need root to use it. This software can be run in one of two modes. If you run it in automatic mode, the software will analyze the file to determine what sort of file it is and what to do with it. In some cases, concordance may not be able to deteremine the filetype; if this happens, you should use manual mode. In manual mode, you specify what you want to do. For any command-line option that requires updating the remote, a filename is required. In manual mode, you must first choose a mode (and only one): MODE-SETTING OPTIONS -c, --dump-config [<filename>] Read the config from the remote and write it to a file. If no filename is specified, config.EZHex is used. -C, --write-config <filename> Read a config from <filename> and write it to the remote. -f, --dump-firmware [<filename>] Read firmware from the remote and write it to a file. If no filename is specified firmware.EZUp is used. -F, --write-firmware <filename> Read firmware from <filename> and write it to the remote -h, --help Print this help message and exit. -i, --print-remote-info Print information about the remote. Additional information will be printed if -v is also used. -k, --get-time Get time from the remote -K, --set-time Set the time on the remote -l, --learn-ir <filename> Learn IR commands from other remotes. Use <filename>. When you selected multiple commands to learn on the Logitech website, you can move through this command list and let the Harmony learn the IR code for each command. -r, --reset Reset (power-cycle) the remote control -s, --dump-safemode [<filename>] Read the safemode firmware from the remote and write it to a file. If no filename is specified, safe.bin is used. -t, --connectivity-test <filename> Do a connectivity test using <filename> -V, --version Print the version and exit NOTE: If using the short options (e.g. -c), then *optional* arguments must be adjacent: -c/path/to/file. Required arguments don't have this limitation, and can be specified -C /path/to/file or -C/path/to/file. Additionally, you can specify options to adjust the behavior of the software: OTHER OPTIONS
-b, --binary-only When dumping a config or firmware, this specifies to dump only the binary portion. When use without a specific filename, the default filename's extension is changed to .bin. When writing a config or firmware, this specifies the filename passed in has just the binary blob, not the XML. --force Force. This forces concordance to use the file the way you specified, even if it doesn't think that's the kind of file it is. This is necessary for files dumped by concordance. -R, --no-reset For config or firmware updates, do not reboot the device when done. This is generally only for debugging. -v, --verbose Enable verbose output. -w, --no-web Do not attempt to talk to the website. This is useful for re-programming the remote from a saved file, or for debugging. BUGS None known at time of release, but check the website. BUG REPORTS
Please file all bug reports in the bugs section of our SourceForge Project page. NOTES
This software is not supported, affiliated, or controlled by Logitech in any way. AUTHOR
concordance was written by Kevin Timmerman and Phil Dibowitz http://www.phildev.net/concordance/ concordance(1)
All times are GMT -4. The time now is 10:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy