What syntax is required so that result will start from a new line..


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting What syntax is required so that result will start from a new line..
# 1  
Old 08-07-2008
What syntax is required so that result will start from a new line..

What syntax is required to start the result in a new line
# 2  
Old 08-07-2008
Your question is too vague. Please clarify.
# 3  
Old 08-07-2008
let say my out put is like below..

i am a boy
i am a boy
i am a boy

but i need the reply as

i am a boy

i am a boy

i am a boy

i mean there must be a line between two line in out put.
# 4  
Old 08-07-2008
Code:
sed G myFile
# already 'double spaced'
sed '/^$/d;G' myFile

sed1liners
# 5  
Old 08-07-2008
thanks for the reply..

my below code working fine..

find /home/ADMIN/owl -name '*.txt' -o -name '*.doc' | xargs ls -l | awk '{print $8 , $9}' > hi.txt

its giving me result inside hi.txt like below

1.txt
2.txt
3.doc
4.csv

i need result like

1.txt

2.txt

3.doc

4.csv

i mean i need space betwn this..so what i need to put in my above code so that it wil give me the result
# 6  
Old 08-07-2008
Code:
find /home/ADMIN/owl -name '*.txt' -o -name '*.doc' | xargs ls -l | awk '{print $8 , $9 , "\n"}' > hi.txt

# 7  
Old 08-07-2008
many thanks...

find /home/ADMIN/{owl,xyz} -name '*.txt' -o -name '*.doc' | xargs ls -l | awk '{print $8 , $9 , "\n"}' > hi.txt

if i need all the results from owl , then all the results from xyz..and there must be a blank line inbetween that..

results from owl

results from xyz
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Reading a file line by line and print required lines based on pattern

Hi All, i want to write a shell script read below file line by line and want to exclude the lines which contains empty value for MOUNTPOINT field. i am using centos 7 Operating system. want to read below file. # cat /tmp/d5 NAME="/dev/sda" TYPE="disk" SIZE="60G" OWNER="root"... (4 Replies)
Discussion started by: balu1234
4 Replies

2. Shell Programming and Scripting

How to compare the current result with previous line result.?

Hi Gurus, I have requirement to compare current result with previous reuslt. The sample case is below. 1 job1 1 1 job2 2 1 job3 3 2 job_a1 1 2 job_a2 2 2 job_a3 3 3 job_b1 1 3 job_b2 2 for above sample file, GID is group ID, for input line, the job run... (1 Reply)
Discussion started by: ken6503
1 Replies

3. Shell Programming and Scripting

Bash script to read a file from particular line till required line and process

Hi All, Am trying to write wrapper shell/bash script on a utility tool for which i need to pass 2 files as arugment to execute utility tool. Wraper script am trying is to do with above metion 2 files. utility tool accepts : a. userinfo file : which contains username b. item file : which... (2 Replies)
Discussion started by: Optimus81
2 Replies

4. Shell Programming and Scripting

How can I get the required result?

Hi, guys. I have a question. Please help me~ I got an text, recording the weather reports. It is the Attachment "Weather Forcast_original.txt" I want to get the required result like the attachment "Weather Forcast_formatted.txt" I thought about the loop, the conditions, but I'm surely... (3 Replies)
Discussion started by: franksunnn
3 Replies

5. Shell Programming and Scripting

start searching a word from the particular record on the result of first occurence change the value

Hi, I need a script to start searching a word from the particular record on the result of first occurence i need to change the value in that record. I have a input file like this <properties> <add key="DeliveryWithinDay" value="False" /> <add key="ABC" value="23:00:00 PM" /> <add... (5 Replies)
Discussion started by: NareshN
5 Replies

6. Red Hat

Cannot start httpd service `GLIBC_2.4' not found (required by /lib/libgcc_s.so.1)

# service httpd start Starting httpd: Syntax error on line 6 of /etc/httpd/conf.d/php.conf: Cannot load /etc/httpd/modules/libphp4.so into server: /lib/tls/libc.so.6: version `GLIBC_2.4' not found (required by /lib/libgcc_s.so.1) I... (2 Replies)
Discussion started by: getrue
2 Replies

7. Shell Programming and Scripting

Help required on joining one line above & below to the pattern matched string line.

Hi Experts, Help needed on joining one line above & below to the pattern matched string line. The input file, required output is mentioned below Input file ABCD DEFG5 42.0.1-63.38.31 KKKK iokl IP Connection Available ABCD DEFG5 42.0.1-63.38.31 ... (7 Replies)
Discussion started by: krao
7 Replies

8. Shell Programming and Scripting

Services Start & stop scripts--help required

Dear All, Pls find my scripts for Agent services strat & stop. EAMSROOT=/opt/panaces export EAMSROOT cd $EAMSROOT nohup ./OracleAgent.sh start & nohup ./PFRAgent.sh start & nohup ./PFR.sh start & nohup ./SolarisOSAgent.sh start & exit 0 EAMSROOT=/opt/panaces export EAMSROOT cd... (0 Replies)
Discussion started by: starnaresh
0 Replies

9. Shell Programming and Scripting

Outputting formatted Result log file from old 30000 lines result log<help required>

Well I have a 3000 lines result log file that contains all the machine data when it does the testing... It has 3 different section that i am intrsted in 1) starting with "20071126 11:11:11 Machine Header 1" 1000 lines... "End machine header 1" 2) starting with "20071126 12:12:12 Machine... (5 Replies)
Discussion started by: vikas.iet
5 Replies

10. UNIX for Dummies Questions & Answers

Oracle like syntax required

m kinda new to unix. i have been trying to write a script where i am trying to switch between users. but the problem is that the syntax like USERNAME/PASSWORD (like oracle SCOT/TIGER) is not working. if i write su USERNAME then the script goes to the command prompt and asks for user to enter... (0 Replies)
Discussion started by: ShellBoy
0 Replies
Login or Register to Ask a Question