Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Search Forums:



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Reply    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 02-07-2012
Registered User
 

Join Date: Dec 2010
Posts: 91
Thanks: 87
Thanked 0 Times in 0 Posts
Help with add new line in between each content

Input file:

Code:
48458951
49529947
46700865
46207063
52639785
47012578
55872838
49258996

Desired output file:

Code:
48458951

49529947

46700865

46207063

52639785

47012578

55872838

49258996

How do add new line in between each content of my input file?
Thanks for any advice
Sponsored Links
    #2  
Old 02-07-2012
balajesuri's Avatar
#! /bin/bash
 

Join Date: Apr 2009
Location: India
Posts: 1,019
Thanks: 9
Thanked 285 Times in 277 Posts

Code:
sed G inputfile


Code:
perl -ne '(!eof)?print "$_\n":print' inputfile

The Following User Says Thank You to balajesuri For This Useful Post:
perl_beginner (02-07-2012)
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Need Help!!! For changing the content of the line handsonzhao Shell Programming and Scripting 2 01-15-2012 10:06 PM
Reading several files and summing their content line-by-line ergy1983 Shell Programming and Scripting 7 07-14-2010 04:16 AM
Search Parameter in first line and replace next line content rdtrivedi UNIX for Advanced & Expert Users 4 03-24-2010 11:03 AM
How to replace a line content victorcheung Shell Programming and Scripting 13 04-21-2008 08:46 PM
Get multiple line content between two chars Feliz Shell Programming and Scripting 2 04-11-2008 12:29 PM



All times are GMT -4. The time now is 04:41 AM.