Sponsored Content
Top Forums Shell Programming and Scripting Need a help to move control to another line in my script Post 302555566 by zaxxon on Thursday 15th of September 2011 05:27:39 AM
Old 09-15-2011
@ahamed:
Smilie, I was thinking to have 3 seconds, but 3 was just too long - 2 was ideal watching the screen to change Smilie

@Renjesh:
Why not use functions? They are very helpful and help structuring your code and also prevent writing same code over and over.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

curser control ~ multi line progress bar

Hi there, I have progress bars in several of my scripts, they work by deleting what has already been writen out, using: clear = "\\010"*( length of string i want to delete ) clearCmd = "echo -ne \""+clear+"\"" os.system(clearCmd) I then re-write the percent done & the progress... (4 Replies)
Discussion started by: purest
4 Replies

2. Shell Programming and Scripting

Script to move the first line of a file to the end

I'm rather new to scripting, and despite my attempts at finding/writing a script to do what I need, I have not yet been successful. I have a file named "list.txt" of arbitrary length with contents in the following format: /home/user/Music/file1.mp3 /home/user/Music/file2.mp3... (21 Replies)
Discussion started by: Altay_H
21 Replies

3. Shell Programming and Scripting

declaring array and move to next line in shell script

Hi, In shell script, I have a value and i like to move that value to a particular position in a file. For example, if i have 20000909 then i like to move that to the 15 to 23 position in a file. Is it possible to have array kind of thing in the shell ? a is array then a = 123 a =... (2 Replies)
Discussion started by: informsrini
2 Replies

4. Shell Programming and Scripting

move to a particular line

Hi, I need to create a report in unix by moving to specified lines and specified positions and print some strings etc.. for eg: i need to print a string on 15th line and 7th position of a file. Please suggest. Thanks, Mohan (3 Replies)
Discussion started by: mohanpadamata
3 Replies

5. Shell Programming and Scripting

move to a particular position and line

Hi, How can i move to particular line and to a particular position in a file using unix commands ? eg: in the line 30 and position 10 i want to print my name in a file. Cheers, Mohan (1 Reply)
Discussion started by: mohanpadamata
1 Replies

6. UNIX for Dummies Questions & Answers

Inserting control characters at the end of each line

How to add control characters at the end of each line in a file? Can anyone help me with this? Thanks, Shobana (2 Replies)
Discussion started by: Shobana_s
2 Replies

7. Shell Programming and Scripting

awk script to move a line after the matched pattern line

I have the following text format in a file which lists the question first and then 5 choices after that the explanantion and finally the answer. 1.The amount of time it takes for most of a worker’s occupational knowledge and skills to become obsolete has been declining because of the... (2 Replies)
Discussion started by: nanchil_guy
2 Replies

8. Shell Programming and Scripting

help: Awk to control number of characters per line

Hello all, I have the following problem: My input is two sorted files: file1 >1_19_130_F3 T01220131330230213311013000000110000 >1_23_69_F3 T01200211300200200010000001000000 >1_24_124_F3 T010203113002002111111200002010 file2 >1_19_130_F3 24 18 9 18 23 4 11 4 5 9 5 8 15 20 4 4 7 4... (9 Replies)
Discussion started by: DerSeb
9 Replies

9. Shell Programming and Scripting

Move lines above a line onto one line

So say I have the file: john london 24 male ======== jane london 22 female ======== mike 23 ======== Bob how do i get the information i need on one line as such: (5 Replies)
Discussion started by: linuxkid
5 Replies

10. Shell Programming and Scripting

Replace Control M (^M) character with new line

Hi All, We are getting an external file in abc.csv format. When opened in excel spread sheet, it is opening alright. But when opened in notepad, I see the contents in a single line. Ftp'd the file in binary mode to AIX UNIX host. When opened, I see Control M (^M) characters in place of New Line... (16 Replies)
Discussion started by: njny
16 Replies
XSetScreenSaver(3X11)						     MIT X11R4						     XSetScreenSaver(3X11)

Name
       XSetScreenSaver, XForceScreenSaver, XActivateScreenSaver, XResetScreenSaver, XGetScreenSaver - manipulate the screen saver

Syntax
       XSetScreenSaver(display, timeout, interval, prefer_blanking, allow_exposures)
	  Display *display;
	  int timeout, interval;
	  int prefer_blanking;
	  int allow_exposures;

       XForceScreenSaver(display, mode)
	  Display *display;
	  int mode;

       XActivateScreenSaver(display)
	  Display *display;

       XResetScreenSaver(display)
	  Display *display;

       XGetScreenSaver(display, timeout_return, interval_return, prefer_blanking_return, allow_exposures_return)
	  Display *display;
	  int *timeout_return, *interval_return;
	  int *prefer_blanking_return;
	  int *allow_exposures_return;

Arguments
       allow_exposures
		 Specifies the screen save control values.  You can pass or

       allow_exposures_return
		 Returns the current screen save control value or

       display	 Specifies the connection to the X server.

       interval  Specifies the interval, in seconds, between screen saver alterations.

       interval_return
		 Returns the interval between screen saver invocations.

       mode	 Specifies the mode that is to be applied.  You can pass or

       prefer_blanking
		 Specifies how to enable screen blanking.  You can pass or

       prefer_blanking_return
		 Returns the current screen blanking preference or

       timeout	 Specifies the timeout, in seconds, until the screen saver turns on.

       timeout_return
		 Returns the timeout, in seconds, until the screen saver turns on.

Description
       Timeout and interval are specified in seconds.  A timeout of 0 disables the screen saver (but an activated screen saver is not deacti-
       vated), and a timeout of -1 restores the default.  Other negative values generate a error.  If the timeout value is nonzero, enables the
       screen saver.  An interval of 0 disables the random-pattern motion.  If no input from devices (keyboard, mouse, and so on) is generated for
       the specified number of timeout seconds once the screen saver is enabled, the screen saver is activated.

       For each screen, if blanking is preferred and the hardware supports video blanking, the screen simply goes blank.  Otherwise, if either
       exposures are allowed or the screen can be regenerated without sending events to clients, the screen is tiled with the root window back-
       ground tile randomly re-origined each interval minutes.	Otherwise, the screens' state do not change, and the screen saver is not acti-
       vated.  The screen saver is deactivated, and all screen states are restored at the next keyboard or pointer input or at the next call to
       with mode

       If the server-dependent screen saver method supports periodic change, the interval argument serves as a hint about how long the change
       period should be, and zero hints that no periodic change should be made.  Examples of ways to change the screen include scrambling the col-
       ormap periodically, moving an icon image around the screen periodically, or tiling the screen with the root window background tile, ran-
       domly re-origined periodically.

       can generate a error.

       If the specified mode is and the screen saver currently is deactivated, activates the screen saver even if the screen saver had been dis-
       abled with a timeout of zero.  If the specified mode is and the screen saver currently is enabled, deactivates the screen saver if it was
       activated, and the activation timer is reset to its initial state (as if device input had been received).

       can generate a error.

       The function activates the screen saver.

       The function resets the screen saver.

       The function gets the current screen saver values.

Diagnostics
       Some numeric value falls outside the range of values accepted by the request.
		 Unless a specific range is specified for an argument, the full range defined by the argument's type is accepted. Any argument
		 defined as a set of alternatives can generate this error.

See Also
       X Window System: The Complete Reference, Second Edition, Robert W. Scheifler and James Gettys

															     XSetScreenSaver(3X11)
All times are GMT -4. The time now is 06:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy