Sponsored Content
Full Discussion: Join Lines
Top Forums Shell Programming and Scripting Join Lines Post 302971513 by ashanabey on Thursday 21st of April 2016 08:18:36 AM
Old 04-21-2016
Join Lines

Hi

how do I join files like below in script.

Thanks,
Ashan

there are may line like this in the file.

Code:
zone name DR_TMP_A_sev1_3eA vsan 200
  pwwn 50:00:09:73:f0:16:35:08
  pwwn c0:50:76:08:6e:dc:00:16

zone name DR_TMP_A_SVR2_3eA vsan 200
  pwwn 50:00:09:73:f0:16:35:08
  pwwn c0:50:76:08:6e:dc:00:00



need out put

Code:
zone name DR_TMP_A_sev1_3eA vsan 200 ,   pwwn 50:00:09:73:f0:16:35:08 ,  pwwn c0:50:76:08:6e:dc:00:16
zone name DR_TMP_A_SVR2_3eA vsan 200 ,   pwwn 50:00:09:73:f0:16:35:08 ,  pwwn c0:50:76:08:6e:dc:00:00




Moderator's Comments:
Mod Comment Please use code tags as required by forum rules!

Last edited by RudiC; 04-21-2016 at 09:20 AM.. Reason: Added code tags.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

join two lines together

Hi, I have a file with on one line a uid, and on the next line a date. I am trying to make the to into one line. Here's an example: koppx 20031125 kraan 20031119 sarox 20031107 And this is what i want it to be: koppx;20031125 kraan;20031119 sarox;20031107 I have been trying... (4 Replies)
Discussion started by: tine
4 Replies

2. Shell Programming and Scripting

Join Every 5 Lines With $ Symbol

Hi All, I have output like this in one file. IFName: aust00m1.mis.amat.com ] ObjID: 5eceea48-0d59-71dd-1512-9887a1f10000 IFAlias: Dest: AMNA austkchr1-ser0/0/0:0.315 Type: FRASI CID: DHEC.559128 IFDescription: ATM9/1/0.315-atm subif Status: Normal IFName: aust00m1.mis.amat.com ] ObjID:... (3 Replies)
Discussion started by: ntgobinath
3 Replies

3. UNIX for Dummies Questions & Answers

how to join lines

can anyone tell me as "how to join all lines in a file " using a shell script Actually i have many files in a directory and for each file i want to join all the lines using a shell scrip . Thanks in advance!!! (8 Replies)
Discussion started by: glamo_2312
8 Replies

4. Shell Programming and Scripting

join lines

input1 x x input2 y x x z join input1 input2>>output ouput x x (2 Replies)
Discussion started by: repinementer
2 Replies

5. Shell Programming and Scripting

Join the lines

Hi All, Currently, the output looks like this: hdisk0 queue_depth:3 hdisk1 queue_depth:3 hdisk2 queue_depth:1 hdisk3 queue_depth:1 I need to change the format to look like this: hdisk0 queue_depth:3 hdisk1 queue_depth:3 hdisk2 queue_depth:1 (8 Replies)
Discussion started by: Beginer0705
8 Replies

6. Shell Programming and Scripting

join 2 lines

hi all i have sample and i need script to do this /dev/xxx oracle test /dev/sap 9999 000 88 99 i need the out put like this /dev/xxx oracle test /dev/sap 9999 000 88 99 can any one provide me with an idea to solve this problem (8 Replies)
Discussion started by: maxim42
8 Replies

7. Shell Programming and Scripting

join two lines

I want to join this two lines but only when after him I have nothing or a comma Yes, I know Jonesy, and I'll give him about one more minute. this two lines must become Yes, I know Jonesy, and I'll give him about one more minute. thank you very much (11 Replies)
Discussion started by: thailand
11 Replies

8. Shell Programming and Scripting

join lines in file

I have a file like this: --------------------------------------------------------------- 26 00:04:48,440 --> 00:04:51,440 I don't know why he can't just do the Great Apache Flaming Arrow Act. 27 00:04:52,440 --> 00:04:54,839 Didn't you tell him to use the gopher snake? 28... (1 Reply)
Discussion started by: thailand
1 Replies

9. Shell Programming and Scripting

Join multiple lines

Hi I have a source file ( written i C ) where a funtion call is spread over multiple lines, for example : func( a, b, c ); I want this to be joined into one single line : func(a,b,c); How can this be done with awk and sed ? Regards. Hench (2 Replies)
Discussion started by: hench
2 Replies

10. UNIX for Dummies Questions & Answers

Join lines in a file????

Hello UNIX gurus, I am new to the world of UNIX. Hopefully I am submitting my question at the right forum. Here is my dilemma - I have a file with contents like this - "line1","Hello","World","Today is a wonderful day","yes it is" "line2","Hello","World","Today is a beautiful day","oh... (8 Replies)
Discussion started by: foolishbar
8 Replies
named-xfer(8)						      System Manager's Manual						     named-xfer(8)

NAME
named-xfer - Pulls BIND zones from another server SYNOPSIS
/usr/sbin/named-xfer -z zone_to_transfer -f db_file -s serial_no [-d debug_level] [-l debug_log_file] [-t trace_file] [-p port] [-S] servers... OPTIONS
Specifies the name of the BIND zone for the named-xfer daemon to transfer, for example, dec.com. This option is required to pull a zone. Specifies the name of the file into which the pulled zone information is placed. This option is required to pull a zone. Specifies the current serial number of the SOA record for the zone zone_to_transfer. If serial_no is set to 0, the zone is always pulled. This option is required to pull a zone. Sets the debug level and determines the amount of debug information to be displayed. Specifies the file that will contain any debug messages from the zone pull. Specifies the file that will contain a trace from the zone pull. Specifies the port that will be used instead of the default name server port listed in /etc/services. Performs a restricted transfer of only the SOA, NS records and glue A records for the zone. The SOA record is not loaded by named, but is used to determine when to verify the NS records. See named(8) for more information. Specifies a list of Internet addresses, in dotted-quad format, from which to pull a zone. If the first host cannot be reached, the named transfer daemon tries to pull the zone from the next host listed. DESCRIPTION
The named transfer daemon, /usr/sbin/named-xfer, is a server that is usually run by the named daemon, /usr/sbin/named, but it can also be run manually with the given arguments. The named transfer daemon runs on a BIND secondary server and pulls BIND zones from a primary server. This daemon is not run by default, nor can it be started up from inetd(8). SEE ALSO
Commands: named(8) Files: resolver(4), services(4) named-xfer(8)
All times are GMT -4. The time now is 01:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy