Remove Line Break VI


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Remove Line Break VI
# 1  
Old 02-28-2012
Remove Line Break VI

I'm trying to make a script that says

echo This is the date: [then is reads the date]

I did this
echo This is the date:
date

and it worked. But I need them both on the same line. And putting date on the echo line doesn't work. Is there a way to do so?
# 2  
Old 02-28-2012
Code:
echo "This is the date: $(date)"

or
Code:
printf "%s" ""This is the date: "
date

This User Gave Thanks to Scrutinizer For This Post:
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Remove line break at specific position

Hi, I need to remove line breaks from a file, but only the ones at specific position. Input file: this is ok this line is divided at posit ion 30. The same as this one, also position 30 the rest of lines are ok with different lengths The longest ones are always s plitted at same... (15 Replies)
Discussion started by: qranumo
15 Replies

2. Shell Programming and Scripting

How to break the line to the one above?

Hello everyone! I'm trying to make the below file1 look like file2, can anyone help? Basically I just hit backspace on every line that starts with a number. Thanks! file1: THIS#IS-IT1 4 THIS#IS-IT2 3 THIS#IS-IT3 2 THIS#IS-IT4 1 Result > file2: (4 Replies)
Discussion started by: demmel
4 Replies

3. UNIX for Dummies Questions & Answers

VI Line Break?

So I'm in a Unix class and our assignment was to go into VI and write a script to make this file tree. At the end of it, I'd like it to echo "This is the file tree you've created" then a line break, then . But I'm not sure as to who to do it. Is there a way for when I run it (./filesystem), the... (4 Replies)
Discussion started by: bbowers
4 Replies

4. Shell Programming and Scripting

Add line break for each line in a file

I cannot seem to get this to work.. I have a file which has about 100 lines, and there is no end of line (line break \n) at the end of each line, and this is causing problem when i paste them into an application. the file looks like this this is a test that is a test balblblablblhblbha... (1 Reply)
Discussion started by: fedora
1 Replies

5. Shell Programming and Scripting

BASH: Break line, read, break again, read again...

...when the lines use both a colon and commas to separate the parts you want read as information. The first version of this script used cut and other non-Bash-builtins, frequently, which made it nice and zippy with little more than average processor load in GNOME Terminal but, predictably, slow... (2 Replies)
Discussion started by: SilversleevesX
2 Replies

6. Shell Programming and Scripting

How to remove line break character in a file

Hi, we are trying to process a csv file,in which we are getting data with line breaks.How to remove the line break character in the file? when i try to print the line break charcter using od -c,it gives as '\n' character for both line break and line feed. Please provide your valuable... (6 Replies)
Discussion started by: cnraja
6 Replies

7. Shell Programming and Scripting

Help to remove line break

My requirement is to read the csv file and need to remove if any line break in it. sample data: Row1: "Oslo, Symra kino",Oslo,130-7,Symra 1,130-7-91Row2:"Tønsberg, Brygga Kino SF",Tønsberg,202-1.Tønsberg SF 4,202-1-4 Expected data: Row1: "Oslo, Symra kino",Oslo,130-7,Symra... (4 Replies)
Discussion started by: cnraja
4 Replies

8. Shell Programming and Scripting

How to remove line break in a csv file

Hi Experts, My requirement is to read the csv file and need to remove if any line break in it. sample data: Row1: "Oslo, Symra kino",Oslo,130-7,Symra 1,130-7-91 Row2:"Tønsberg, Brygga Kino SF",Tønsberg,202-1, Tønsberg SF 4,202-1-4 Expected data: Row1: "Oslo, Symra... (6 Replies)
Discussion started by: cnraja
6 Replies

9. Shell Programming and Scripting

TO break a line

hi All, Have a doubt in ksh..Am not familiar with arrays but i have tried out a script.. plzzzzz correct me with the script My i/p File is: (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (Host = 192.168.2.2) (Port = 1525) ) ) (CONNECT_DATA = (SID = TESTDB1) ) ) ... (7 Replies)
Discussion started by: aajan
7 Replies

10. Shell Programming and Scripting

Remove Line Break

Dear all, Please advise what approach can remove all line break from a text file? e.g. Source file: A B C Target file: A, B, C Thanks, Rock (5 Replies)
Discussion started by: Rock
5 Replies
Login or Register to Ask a Question