turn list into one line


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting turn list into one line
# 1  
Old 10-18-2011
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

Code:
1
2
3
4
5

into

Code:
1 2 3 4 5


thanks
# 2  
Old 10-18-2011
# 3  
Old 10-18-2011
thanks for the speedy reply, i see i can use tr -d '\n' how would i make it so there is a space between the words
# 4  
Old 10-18-2011
just go through the answers which i have provided below in the above posted post ..
# 5  
Old 10-18-2011
doh, sorry just saw that

thanks for the help
much appriacted
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Just can't turn off ipv6?

I'm running a Linux OS that uses Debian as it's base. A commercial vpn is installed that uses OpenVPN. For some reason, I can't get ipv6 to tunnel properly .... and Ipleak.net shows that my location is being unmasked by ipv6. I've tried kernel commands at boot, I've tried sysctl.conf commands.... (2 Replies)
Discussion started by: benc
2 Replies

2. Solaris

how to turn on or off FIREWALL in solaris 10

hi, i am an oracle DBA and having problems with the starting of enterprise manager on solaris. one of solution is to check whether firewall is on or off so i am new bie in solaris so kindly tell me how to check the firewall in solaris 10 and how to stop it and what are effects of such... (2 Replies)
Discussion started by: janakors
2 Replies

3. 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

4. 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

5. Red Hat

Turn off subshelling of pipe

After searching the forum, I found that Bash spawns a subshell when using the pipe. I am wondering if there is an option or any other way to turn off this fuctionality. We are pulling over some scripts from a Korn shell environment. I have found ways to work around looping from a pipe (Thanks... (4 Replies)
Discussion started by: jryan
4 Replies

6. UNIX for Advanced & Expert Users

Eth1 turn off by itself after reboot

Hi, Recently we discovered the eth1 of one of the server turn off by itself when the system reboot. Could someone please advise how to fix it? Thanks (4 Replies)
Discussion started by: beeloo
4 Replies

7. UNIX for Dummies Questions & Answers

turn off sound

how to disable anoying beep sound??? (4 Replies)
Discussion started by: nnn
4 Replies

8. Shell Programming and Scripting

Turn off Screen Output

Is there a way to turn off standard output while processing is going on? I have tried redirecting to /dev/null but that is not working because some of the commands invoke a profile. I would like to temporarily turn off the screen output until the processing is complete. Sort of like a splash... (3 Replies)
Discussion started by: bestbuyernc
3 Replies

9. UNIX for Dummies Questions & Answers

How to turn off duplex

I am using digital Unix and lpd. I have HP 4200n LaserJet TCP printer, but when I use lpr command, it always print duplex. I can turn off duplex feature at the panel of the printer, but then other Windows computer cannot print duplex. How can I set up /etc/printcap file so that it will be... (2 Replies)
Discussion started by: hiepng
2 Replies
Login or Register to Ask a Question