Sponsored Content
Full Discussion: List into one line?
Top Forums UNIX for Dummies Questions & Answers List into one line? Post 302580745 by Iifa on Friday 9th of December 2011 12:38:10 PM
Old 12-09-2011
List into one line?

Probably, something really easy to do and stupid to ask help with it, but how to turn a list of numbers into one line of numbers.

I have:
Code:
, 116332682         
, 116332683         
, 116332685         
, 116332686         
, 116332687         
, 116332688         
, 116332689         
, 116332691

I need:
Code:
, 116332682, 116332683, 116332685, 116332686, 116332687, 116332688, 116332689, 116332691

I tried to cut, sed functions but they weren't right probably, and the unix is not really my thing Smilie

Thanks for any help.

Last edited by Scott; 12-09-2011 at 01:46 PM.. Reason: Code tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

converting a list into a line

Hi, this is a pretty intersting problem, I would like to convert a list of words into a concatenated string of words with whitespace between each word. e.g file list :- hello how are you today convert into hello how are you today. What command would I use to do this? Thanks (2 Replies)
Discussion started by: zulander
2 Replies

2. Shell Programming and Scripting

i want to list all command line arguments except

Hi all i want to list out all command line arguments except $1 i have passed to a script. Ex: sh cmdline.sh one two three four five o/p: two three four five (3 Replies)
Discussion started by: naree
3 Replies

3. UNIX and Linux Applications

Need to list pattern only not containing whole line

I am searching a pattern item_id>000111111</item_id> in an XML file. More than one occurance are there for this patter in a single line. I have tried awk '/item_id/,/item_id/' tpnb1.txt>abc.txt Full lines containg pattern are coming. I need only list of 000111111. (1 Reply)
Discussion started by: tredev
1 Replies

4. Shell Programming and Scripting

how do I list my values one per line instead of across it?

I want to list my vars in a script so they look like while read IN var1 var2 var3 var4 do echo $IN done Then in the same script have them read and processed. the closest I can get is as follows but this is obviously wrong. NOTE I want a list not all the entries on one line, that... (5 Replies)
Discussion started by: pobman
5 Replies

5. Shell Programming and Scripting

Create list in command line

How do you create lists or arrays in the command line? And how do you access specific cells of the list? (1 Reply)
Discussion started by: locoroco
1 Replies

6. UNIX for Dummies Questions & Answers

Appending lines from an existing list to each line in another existing list

Evening all ! I would like to ask your expertise on how to accomplish the following ; I have 2 lists, and would like each line from list2 to be appended to each line in list1, resulting in list3 ; List1; alpha beta charlie List2; one two three (4 Replies)
Discussion started by: TAPE
4 Replies

7. Shell Programming and Scripting

turn list into one line

Hi All i am cat'ing a file and then using cut to get rid of some info, is there a way to turn the list into one line i.e 1 2 3 4 5 into 1 2 3 4 5 (4 Replies)
Discussion started by: ab52
4 Replies

8. Shell Programming and Scripting

Print pipe separated list as line by line in Korn Shell

Korn Shell in AIX 6.1 I want to print the below shown pipe (|) separated list line by line. line=es349889|nhb882309|ts00293|snh03524|bg578835|bg37900|rnh00297|py882201|sg175883 for i in line do echo "Hello $line " done I wanted to execute the above for loop. But i can't even set the... (3 Replies)
Discussion started by: polavan
3 Replies

9. Shell Programming and Scripting

List second line entries

Hello everyone, I have a list of new empolyee by year. ( list of employess can be more one than a line) this is my list format # cat mylist.txt 2009 new hire mike noah vaar 2010 new hire 2011 new hire sara phill mike bob tala ali zula 2012 new hire I would like a to have a... (8 Replies)
Discussion started by: Sara_84
8 Replies

10. Shell Programming and Scripting

List files output only for the last line

Hi, "ls -tl directory1" will list files to be sorted in mtime, but I don't want to see all the files in each directory, I want to only see output the last line (the oldest mtime) for each directory. $ ls -tl test1 -rw-r--r-- 1 hce hce 1714397 May 30 2013 b.txt -rw-r--r-- 1 hce hce 4678 May... (2 Replies)
Discussion started by: hce
2 Replies
fixadd(3alleg4) 						  Allegro manual						   fixadd(3alleg4)

NAME
fixadd - Safe function to add fixed point numbers clamping overflow. Allegro game programming library. SYNOPSIS
#include <allegro.h> fixed fixadd(fixed x, fixed y); DESCRIPTION
Although fixed point numbers can be added with the normal '+' integer operator, that doesn't provide any protection against overflow. If overflow is a problem, you should use this function instead. It is slower than using integer operators, but if an overflow occurs it will set `errno' and clamp the result, rather than just letting it wrap. Example: fixed result; /* This will put 5035 into `result'. */ result = fixadd(itofix(5000), itofix(35)); /* Sets `errno' and puts -32768 into `result'. */ result = fixadd(itofix(-31000), itofix(-3000)); ASSERT(!errno); /* This will fail. */ RETURN VALUE
Returns the clamped result of adding `x' to `y', setting `errno' to ERANGE if there was an overflow. SEE ALSO
fixsub(3alleg4), fixmul(3alleg4), fixdiv(3alleg4) Allegro version 4.4.2 fixadd(3alleg4)
All times are GMT -4. The time now is 03:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy