Sponsored Content
Top Forums Shell Programming and Scripting I need help editing a pgn file Post 302372662 by danmero on Wednesday 18th of November 2009 12:42:38 PM
Old 11-18-2009
Quote:
Originally Posted by Scrutinizer
This almost works, but there is a leading space where there should not be one:
Code:
awk '!NF{ORS=(FS==ORS)?"\n":FS}1' infile

Duplicate post Smilie
Code:
awk '!NF{ORS=(ORS==RS)?FS:RS;next}1' infile

 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Editing the end of the file without loading the entire file

hi! I am a newbee. I would really appreciate if you can answer the following question: I have a huge data file, 214MB with several coloumns. I need to delete the very last line of the file. Everything I know takes a lot of time to do it ( because I have to open the file in an editor or run a... (3 Replies)
Discussion started by: Garuda
3 Replies

2. Shell Programming and Scripting

Editing file

Hi, I am in a situation wherein am getting file file certailn values suppose 1u56979hhghhklklkkkjkjkjk 0 0 0 The file will have values like above only. I need to add another field of NULL value(of length 9) at the end of first column i.e. It should like this after editing:... (4 Replies)
Discussion started by: rahul303
4 Replies

3. Linux

file editing

I have created a file with vi -x (file name) this is encrypted file when i again open this file it ask me to enter a password before editing it.Can i remove this password but i don't want to delete a file how to do this. Thanks (0 Replies)
Discussion started by: ambavaram
0 Replies

4. Shell Programming and Scripting

editing a file

Hi i have a file name as file1 which has Following content: ROLLOVER_INTERVAL=0 OUTPUT_DIR_COUNT=MULTIPLE FILETYPE=XmlExporter i want to change the FILETYPE=recordexport can any one pls help me on this 2nd query: i want to change OUTPUT_DIR_COUNT=MULTIPLE as ... (2 Replies)
Discussion started by: Aditya.Gurgaon
2 Replies

5. Shell Programming and Scripting

editing a file

i am writing a script to edit entries in a file. what command will edit a specific file? ex: echo) "what number would you like to change read "number" this is where I am stuck. what command will edit my specific file? (3 Replies)
Discussion started by: gustave
3 Replies

6. Shell Programming and Scripting

Help with file editing while keeping file format intact

Hi, I am having a file which is fix length and comma seperated. And I want to replace values for one column. I am reading file line by line in variable $LINE and then replacing the string. Problem is after changing value and writing new file temp5.txt, formating of original file is getting... (8 Replies)
Discussion started by: Mruda
8 Replies

7. Shell Programming and Scripting

editing line in text file adding number to value in file

I have a text file that has data like: Data "12345#22" Fred ID 12345 Age 45 Wilma Dino Data "123#22" Tarzan ID 123 Age 33 Jane I need to figure out a way of adding 1,000,000 to the specific lines (always same format) in the file, so it becomes: Data "1012345#22" Fred ID... (16 Replies)
Discussion started by: say170
16 Replies

8. Shell Programming and Scripting

Need help in editing a file

I have a file which has 10 million records in it. When am trying to edit the file with vi, the following error occurs: ~ ~ ~ ~ ~ ~ ~ ~ "file1" Value too large for defined data type Is there any way that I can edit this file without using vi? Any help would be really appreciated.... (8 Replies)
Discussion started by: bobby1015
8 Replies

9. UNIX for Dummies Questions & Answers

File editing

Hi All, I've to edit the below file in the Current File: XXX Rows found with null for one or more non-nullable columns in the source table SELECT COUNT(*) FROM ( SELECT 1 as one FROM datum WHERE:wall: datum.ID IS NULL ) a (1 Reply)
Discussion started by: udayakumar
1 Replies

10. Shell Programming and Scripting

Convert vi editing to text editing

Dear Guru's I'm using Putty and want to edit a file. I know we generally use vi editor to do it. As I'm not good in using vi editor, I want to convert the vi into something like text pad. Is there any option in Putty to do the same ? Thanks for your response. Srini (6 Replies)
Discussion started by: thummi9090
6 Replies
glutEnterGameMode(3GLUT)					       GLUT						  glutEnterGameMode(3GLUT)

NAME
glutEnterGameMode, glutLeaveGameMode - enters and leaves GLUT's game mode. SYNTAX
void glutEnterGameMode(void); void glutLeaveGameMode(void); DESCRIPTION
glutEnterGameMode is designed to enable high-performance fullscreen GLUT rendering, possibly at a different screen display format. Calling glutEnterGameMode creates a special fullscreen GLUT window (with its own callbacks and OpenGL rendering context state). If the game mode string describes a possible screen display format, GLUT also changes the screen display format to the one described by the game mode string. glutLeaveGameMode leaves the GLUT game mode and returns the screen display format to its default format. When game mode is entered, certain GLUT functionality is disable to facilitate high-performance fullscreen rendering. GLUT pop-up menus are not available while in game mode. Other created windows and subwindows are not displayed in GLUT game mode. Game mode will also hide all other applications running on the computer's display screen. The intent of these restrictions is to eliminate window clipping issues, permit screen display format changes, and permit fullscreen rendering optimization such as page flipping for fullscreen buffer swaps. After leaving game mode, the GLUT functionality disabled in game mode is available again. The game mode window (and its OpenGL rendering state) is destroyed when leaving game mode. Any windows and subwindows created before entering the game mode are displayed in their previ- ous locations. The OpenGL state of normal GLUT windows and subwindows is not disturbed by entering and/or leaving game mode. The following GLUT routines are ignored in game mode: glutFullScreen, glutSetWindowTitle, glutSetIconTitle, glutPositionWindow, glutRe- shapeWindow, glutPopWindow, glutPushWindow, glutIconifyWindow, glutShowWindow, glutHideWindow. glutEnterGameMode can be called when already in game mode. This will destroy the previous game mode window (including any OpenGL rendering state) and create a new game mode window with a new OpenGL rendering context. Also if glutEnterGameMode is called when already in game mode and if the game mode string has changed and describes a possible screen display format, the new screen display format takes effect. A reshape callback is generated if the game mode window changes size due to a screen display format change. Re-entering game mode provides a mechanism for changing the screen display format while already in game mode. Note though that the game mode window's OpenGL state is lost in this process and the application is responsible for re-initializing the newly created game mode win- dow OpenGL state when re-entering game mode. Game mode cannot be entered while pop-up menus are in use. Note that the glutEnterGameMode and glutFullScreen routines operate differently. glutFullScreen simply makes the current window match the size of the screen. glutFullScreen does not change the screen display format and does not disable any GLUT features such as pop-up menus; glutFullScreen continues to operate in a "windowed" mode of operation. glutEnterGameMode creates a new window style, possibly changes the screen display mode, limits GLUT functionality, and hides other applications. SEE ALSO
glutGameModeGet, glutGameModeString, glutInitDisplayString AUTHOR
Mark J. Kilgard (mjk@nvidia.com) GLUT
3.7 glutEnterGameMode(3GLUT)
All times are GMT -4. The time now is 10:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy