Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


bash programming problem

Posted on 1999-07-04
Medium Priority
Last Modified: 2010-03-18
Take the following clear example.

Create file1 and 2 containing some single line strings and test them with cat.
[root@gateway root]# echo "BlaBlaBla" >file2
[root@gateway root]# cat file2

[root@gateway root]# echo "BooBooBoo" >file1
[root@gateway root]# cat file1

Now If i try the logical solution to string the contents of two files tgether by doing;

[root@gateway root]# cat file1 file2 >file3
      [root@gateway root]# cat file3
      [root@gateway root]#

      Which is not what I want! I want;

How do I get the latter ??????????????

Please help I need to get this spooler going!!!!!!!!!!!!!
Question by:dryzone
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
LVL 51

Accepted Solution

ahoffmann earned 800 total points
ID: 1585591
  (cat file1|tr '\012' ' ';cat file2)>file3
   (echo -n "BlaBlaBla"; echo "BooBooBoo")>file3

Featured Post

ATEN's HDBaseT Presentation at InfoComm 2017

Hear ATEN Product Manager YT Liang review HDBaseT technology, highlighting ATEN’s latest solutions as they relate to real-world applications during her presentation at the HDBaseT booth at InfoComm 2017.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question