Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to make all lines into 1 line? Post 302121409 by radoulov on Wednesday 13th of June 2007 04:19:49 PM
Old 06-13-2007
Given your input file format:

Code:
printf "\"%s\" " $(<file)

If you want the last new line:

Code:
printf "\"%s\" " $(<file);printf "\n"

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Make sed ignore lines

Hi I use sed in a script for severall changes in files. I whish one of the substitutions I made to be aplied to every line that has the word "scripts" with the exception for the ones that start with "rsh", wich I wish sed to ignore . Is this possible? If yes, how can I do it? The substitution... (2 Replies)
Discussion started by: Scarlos
2 Replies

2. Shell Programming and Scripting

extract perticular lines and make them into speadsheet

Hi Masters, I knew this isn't a new issue, but couldn't find any similar threads. So, I have to bother you. Here is my input file (genomic data). The file has many sessions, each session seperated by //. Within eash session there is only one ID and GN line. ID 3HAO_HUMAN STANDARD; ... (4 Replies)
Discussion started by: mskcc
4 Replies

3. Shell Programming and Scripting

to make 2 lines into 1 line using awk

suppose i have a file AAAHHHHAHH AJJJJAAAAAA AJJJJJAAJJAK AJJAJJAJKKK the output suhd be AAAHHHHAHHAJJJJAAAAAAAJJJJJAAJJAKAJJAJJAJKKK (2 Replies)
Discussion started by: cdfd123
2 Replies

4. Shell Programming and Scripting

make multiple line containing a pattern into single line

I have the following data file. zz=aa azxc-1234 aa=aa zz=bb azxc-1234 bb=bb zz=cc azxc-1234 cc=cc zz=dd azxc-2345 dd=dd zz=ee azxc-2345 ee=ee zz=ff azxc-3456 ff=ff zz=gg azxc-4567 gg=gg zz=hh azxc-4567 hh=hh zz=ii azxc-4567 ii=ii I want to make 2nd field pattern matching multiple lines... (13 Replies)
Discussion started by: VTAWKVT
13 Replies

5. UNIX for Dummies Questions & Answers

sed command, make multiple lines into one

:confused:Hi, I'm relativley new at unix so am having difficulties at the most basic of areas. I am trying using sed to make multiple lines into one line. For example, i would like: Mary had a little lamb to look like this Maryhadalittlelamb so far i have tried sed... (1 Reply)
Discussion started by: cavanac2
1 Replies

6. Shell Programming and Scripting

How to make duplicate lines

input tophr5:178975153-178982740:+ tophrX:14502176-14502376:+ output >tophr5:178975153-178982740:+ tophr5:178975153-178982740:+ >tophrX:14502176-14502376:+ tophrX:14502176-14502376:+ (2 Replies)
Discussion started by: quincyjones
2 Replies

7. Shell Programming and Scripting

Make all lines divisible by three

Hi, I need some help with the following: I need all lines in a file divisible by three, so for a file like this: 1 11 111 I want to add characters to make them all divisible by three (e.g. with an X): 1XX 11X 111 I would like to also ignore all lines that begin with the... (2 Replies)
Discussion started by: mikey11415
2 Replies

8. Shell Programming and Scripting

Make Multile line is one line using window Perl

Hi All I have a .csv file which is showing data as ESP Client,ESP Engagement,Misc_Projects_120101,DEFAULT,HA,Unknown,No,Unknown,201704,4.1,Unknown,AAA,Collected-Done,"she,joy.",200111,Unknown,Full Time,,Delivery_DONE AMO,Approved,2012-12-03,2012-12-06,2012-12-06,"Occupied Hours ... (7 Replies)
Discussion started by: adisky123
7 Replies

9. Shell Programming and Scripting

Need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line...

Hello, I need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line... An example of entries in the file would be: SRVXPAPI001 ERRO JUN24 07:28:34 1775 REASON= 0000, PROCID= #E506 #1065: TPCIPPR, INDEX= 003F ... (8 Replies)
Discussion started by: Ferocci
8 Replies

10. UNIX for Beginners Questions & Answers

Get an output of lines in pattern 1st line then 10th line then 11th line then 20th line and so on.

Input file: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 (6 Replies)
Discussion started by: Sagar Singh
6 Replies
SDL_ListModes(3)						 SDL API Reference						  SDL_ListModes(3)

NAME
SDL_ListModes - Returns a pointer to an array of available screen dimensions for the given format and video flags SYNOPSIS
#include "SDL.h" SDL_Rect **SDL_ListModes(SDL_PixelFormat *format, Uint32 flags); DESCRIPTION
Return a pointer to an array of available screen dimensions for the given format and video flags, sorted largest to smallest. Returns NULL if there are no dimensions available for a particular format, or -1 if any dimension is okay for the given format. If format is NULL, the mode list will be for the format returned by SDL_GetVideoInfo()->vfmt. The flag parameter is an OR'd combination of surface flags. The flags are the same as those used SDL_SetVideoMode and they play a strong role in deciding what modes are valid. For instance, if you pass SDL_HWSURFACE as a flag only modes that support hardware video surfaces will be returned. EXAMPLE
SDL_Rect **modes; int i; . . . /* Get available fullscreen/hardware modes */ modes=SDL_ListModes(NULL, SDL_FULLSCREEN|SDL_HWSURFACE); /* Check is there are any modes available */ if(modes == (SDL_Rect **)0){ printf("No modes available! "); exit(-1); } /* Check if or resolution is restricted */ if(modes == (SDL_Rect **)-1){ printf("All resolutions available. "); } else{ /* Print valid modes */ printf("Available Modes "); for(i=0;modes[i];++i) printf(" %d x %d ", modes[i]->w, modes[i]->h); } . . SEE ALSO
SDL_SetVideoMode, SDL_GetVideoInfo, SDL_Rect, SDL_PixelFormat SDL
Tue 11 Sep 2001, 23:01 SDL_ListModes(3)
All times are GMT -4. The time now is 10:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy