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

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

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…
Watch the video to learn how one can deal with PST file corruption issue with an outstanding Kernel for Outlook PST Repair Tool easily. Using this tool, non-technical users can swiftly perform the repair process to restore their essential data witho…

623 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