Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Script dosent exits after executing the script Post 302795981 by vikatakavi on Thursday 18th of April 2013 04:36:54 PM
Old 04-18-2013
HI Corona688 thansk for the quick reply.

i made changes as above ,but still i had to do CTRL+C to return normal screeen
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script exits with $? not 0 randomly, how can I see what command failed?

Hi! I have this situation with 3 shellscripts. One is a "startscript" that simply calls other scripts. This one is scheduled with cron to run at regular intervals. That script runs what I'll refer to as Script 1. Script 1 in turn runs script 2 (import_catalogs_buyer.sh) Sometimes, seemingly... (2 Replies)
Discussion started by: trailsmoke
2 Replies

2. Shell Programming and Scripting

Exit script if the user dosent enter any data within 5 seconds

Hello friends, Kindly help me in developing a script that asks user to enter a value and will wait for 5 seconds for the feedback. If there is no answer from the user the script will perform exit or it will continue doing something else Ex: If yu have a multi OS system i believe while... (3 Replies)
Discussion started by: frozensmilz
3 Replies

3. UNIX for Advanced & Expert Users

Executing a shell script from windows;script present in unix

I need to execute a shell script kept in unix machine from windows. User id, password area available. For eg. There's a shell script wich moves all the logs kept in my home directory to a directory named LOGS. Now i need to get this done through windows; either using a batch file, or java... (4 Replies)
Discussion started by: rajneesh_kapoor
4 Replies

4. Shell Programming and Scripting

Exits from putty instead of shell script

Dear, I have written below code to initiate the log at top of my script. #Set the log file LOGFILE=<path>/<filename.log> exec > $LOGFILE 2>&1 ............... .... ... .. ............ echo -e "\n\n Script finished OK " `date "+%m/%d/%y %H:%M:%S" ` "\n\n" exit 0 the logging ends only... (14 Replies)
Discussion started by: Imran_Chennai
14 Replies

5. Shell Programming and Scripting

'script' command exits immediately

I'm trying to capture the output of some commands with the 'script' utility. Normally, I would type 'script /path/to/output/file', then enter commands, then hit ctrl+D to end the 'script' capture. I'm having trouble with it on a server. Upon starting 'script', it exits immediately before I type... (6 Replies)
Discussion started by: jalburger
6 Replies

6. Shell Programming and Scripting

Shell scripts exits after executing ypmatch

Hello - I have a script which creates a NIS user on Solaris machine. Before creating the user I check if the user being created laready exists or not using ypmatch and use $? to get the exit code. If a user exists, I get 0, works fine. However when the user is not found, the shell scripts exits by... (1 Reply)
Discussion started by: manju--
1 Replies

7. Shell Programming and Scripting

Ssh bash script exits without remote command completion

Hi, My goal is to connect from unix server A to windows server B and call a bat file on windows. I am able to succeed in remoting to windows and executing a command, the issue i am facing is the shell scrip is exiting without making sure of bat file success. Can you please help me in... (4 Replies)
Discussion started by: pxp018
4 Replies

8. Shell Programming and Scripting

Script exits when using UNIX2dos / dos2UNIX

I'm not sure why but my script quits automatically at the point where unix2dos / dos2unix command is used. :confused::confused::confused: How do a fix it? LOG_FILE=MADDY.txt unix2dos ${LOG_FILE} exec 2> $LOG_FILE 1>&2 echo ${LOG_FILE} The script exists after the below... (3 Replies)
Discussion started by: machomaddy
3 Replies

9. UNIX for Beginners Questions & Answers

Script to check if files exits

Hi In live system core files are generating frequently. around 10 core files in 30 mins in root file system. which is eating my space very much below is core file core.56539 core.78886 core.12302 core.80554 core.20147 I am trying to write a script which should move... (7 Replies)
Discussion started by: scriptor
7 Replies

10. UNIX for Beginners Questions & Answers

Bash script to compare file all the files exits or not

Currently i am building a script like based on region parameter it will filter the records in config file and then it will create a text file like ab.txt and it will read the path location in that file and now i need to compare the files name in the config file to files in the path of the config... (1 Reply)
Discussion started by: saranath
1 Replies
xcb-requests(3) 						   XCB examples 						   xcb-requests(3)

NAME
xcb-requests - about request manpages DESCRIPTION
Every request in X11, like MapWindow, corresponds to a number of functions and data structures in XCB. For MapWindow, XCB provides the function xcb_map_window, which fills the xcb_map_window_request_t data structure and writes that to the X11 connection. Since the MapWindow request does not have a reply, this is the most simple case. REPLIES
Many requests have replies. For each reply, XCB provides at least a corresponding data structure and a function to return a pointer to a filled data structure. Let's take the InternAtom request as an example: XCB provides the xcb_intern_atom_reply_t data structure and xcb_intern_atom_reply function. For replies which are more complex (for example lists, such as in xcb_list_fonts), accessor functions are provided. COOKIES
XCB returns a cookie for each request you send. This is an XCB-specific data structure containing the sequence number with which the request was sent to the X11 server. To get any reply, you have to provide that cookie (so that XCB knows which of the waiting replies you want). Here is an example to illustrate the use of cookies: void my_example(xcb_connection *conn) { xcb_intern_atom_cookie_t cookie; xcb_intern_atom_reply_t *reply; cookie = xcb_intern_atom(conn, 0, strlen("_NET_WM_NAME"), "_NET_WM_NAME"); /* ... do other work here if possible ... */ if ((reply = xcb_intern_atom_reply(conn, cookie, NULL))) { printf("The _NET_WM_NAME atom has ID %u0, reply->atom); } free(reply); } CHECKED VS. UNCHECKED The checked and unchecked suffixes for functions determine which kind of error handling is used for this specific request. For requests which have no reply (for example xcb_map_window), errors will be delivered to the event loop (you will receive an X11 event of type 0 when calling xcb_poll_for_event). If you want to explicitly check for errors in a blocking fashion, call the _checked version of the function (for example xcb_map_window_checked) and use xcb_request_check. For requests which have a reply (for example xcb_intern_atom), errors will be checked when calling the reply function. To get errors in the event loop instead, use the _unchecked version of the function (for example xcb_intern_atom_unchecked). Here is an example which illustrates the four different ways of handling errors: /* * Request without a reply, handling errors in the event loop (default) * */ void my_example(xcb_connection *conn, xcb_window_t window) { /* This is a request without a reply. Errors will be delivered to the event * loop. Getting an error to xcb_map_window most likely is a bug in our * program, so we don't need to check for that in a blocking way. */ xcb_map_window(conn, window); /* ... of course your event loop would not be in the same function ... */ while ((event = xcb_wait_for_event(conn)) != NULL) { if (event->response_type == 0) { fprintf("Received X11 error %d ", error->error_code); free(event); continue; } /* ... handle a normal event ... */ } } /* * Request without a reply, handling errors directly * */ void my_example(xcb_connection *conn, xcb_window_t deco, xcb_window_t window) { /* A reparenting window manager wants to know whether a new window was * successfully reparented. If not (because the window got destroyed * already, for example), it does not make sense to map an empty window * decoration at all, so we need to know this right now. */ xcb_void_cookie_t cookie = xcb_reparent_window_checked(conn, window, deco, 0, 0); xcb_generic_error_t *error; if ((error = xcb_request_check(conn, cookie))) { fprintf(stderr, "Could not reparent the window "); free(error); return; } /* ... do window manager stuff here ... */ } /* * Request with a reply, handling errors directly (default) * */ void my_example(xcb_connection *conn, xcb_window_t window) { xcb_intern_atom_cookie_t cookie; xcb_intern_atom_reply_t *reply; xcb_generic_error_t *error; cookie = xcb_intern_atom(c, 0, strlen("_NET_WM_NAME"), "_NET_WM_NAME"); /* ... do other work here if possible ... */ if ((reply = xcb_intern_atom_reply(c, cookie, &error))) { printf("The _NET_WM_NAME atom has ID %u0, reply->atom); free(reply); } else { fprintf(stderr, "X11 Error %d ", error->error_code); free(error); } } /* * Request with a reply, handling errors in the event loop * */ void my_example(xcb_connection *conn, xcb_window_t window) { xcb_intern_atom_cookie_t cookie; xcb_intern_atom_reply_t *reply; cookie = xcb_intern_atom_unchecked(c, 0, strlen("_NET_WM_NAME"), "_NET_WM_NAME"); /* ... do other work here if possible ... */ if ((reply = xcb_intern_atom_reply(c, cookie, NULL))) { printf("The _NET_WM_NAME atom has ID %u0, reply->atom); free(reply); } /* ... of course your event loop would not be in the same function ... */ while ((event = xcb_wait_for_event(conn)) != NULL) { if (event->response_type == 0) { fprintf("Received X11 error %d ", error->error_code); free(event); continue; } /* ... handle a normal event ... */ } } SEE ALSO
xcb_map_window(3), xcb_intern_atom(3), xcb_list_fonts(3), xcb_poll_for_event(3), xcb_request_check(3) AUTHOR
Michael Stapelberg <michael+xcb at stapelberg dot de> XCB
2011-12-11 xcb-requests(3)
All times are GMT -4. The time now is 02:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy