Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Joining lines to single line in VI Post 95599 by bobo on Thursday 12th of January 2006 01:48:56 PM
Old 01-12-2006
Network Joining lines to single line in VI

Dear friends,

In VI, I have these data shown below:

Line1
Line2
Line3
Line4

How can I JOIN these line to the first line? When I finished I should have:

Line1 Line2 Line3 Line4

is there a text length limit of how long a single line can be in VI?

Thank you much!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need output in different lines not in one single line

I am getting the coutput like this as show below in one single line, where as the command is executed is several lines and the output should also be requied in several lines, not in one single line. Anyone any idea? p4 opened -a | grep *locked* | awk '{ printf $8 }' >/tmp/aa $ cat... (1 Reply)
Discussion started by: csaha
1 Replies

2. Shell Programming and Scripting

Joining lines in reverse. append line 1 to line 2.

Hi I have used many times the various methods to append two lines together in a file. This time I want to append the 1st line to the second and repeat for the complete file.... an example This is the file owns the big brown dog joe owns the small black dog jim What I want is ... (7 Replies)
Discussion started by: dwalley
7 Replies

3. Shell Programming and Scripting

joining 2 lines into single one

i have a script that joins 2 lines of a file into one line and again next 2 line into one line. if number of line is 4 then after joining it should be 2 lines in a file my file a1.txt has some of the below lines 1-GH32X, CC, AMR, Number of Intervals Not Inserted: 1 / 95 1-150KP1, CC,... (3 Replies)
Discussion started by: ali560045
3 Replies

4. Shell Programming and Scripting

Break lines up into single lines after each space in every line

It sounds a bit confusing but what I have is a text file like the example below (without the Line1, Line2, Line3 etc. of course) and I want to move every group of characters into a new line after each space. Example of text file; line1 .digg-widget-theme2 ul { background: rgb(0, 0, 0) none... (7 Replies)
Discussion started by: lewk
7 Replies

5. Shell Programming and Scripting

split single line into two line or three lines

Dear All, I want to split single line into two line or three lines wherever “|” separated values comes using Input line test,DEMTEMPUT20100404010012,,,,,,,,|0070086|0070087, output shoule be test,DEMTEMPUT20100404010012,,,,,,,,0070086, test,DEMTEMPUT20100404010012,,,,,,,,0070087, (14 Replies)
Discussion started by: arvindng
14 Replies

6. Shell Programming and Scripting

Joining contents in multiple lines to a single line

I do have a file with contents splited into multiple lines ADSLHLJASHGLJSKAGHJJGAJSLGAHLSGHSAKBV AJHALHALHGLAGLHGBJVFBJVLFDHADAH GFJAGJAGAJFGAKGAKGFAK AJHFAGAKAGAGKAKAKGKAGFGJDGDJJDGJDJDFAG ... ... .... 100's of lines I would like to rearrange the content of this file so it will be a... (1 Reply)
Discussion started by: Lucky Ali
1 Replies

7. Shell Programming and Scripting

Multiple lines in a single column to be merged as a single line for a record

Hi, I have a requirement with, No~Dt~Notes 1~2011/08/1~"aaa bbb ccc ddd eee fff ggg hhh" Single column alone got splitted into multiple lines. I require the output as No~Dt~Notes 1~2011/08/1~"aaa<>bbb<>ccc<>ddd<>eee<>fff<>ggg<>hhh" mean to say those new lines to be... (1 Reply)
Discussion started by: Bhuvaneswari
1 Replies

8. Shell Programming and Scripting

Joining multi-line output to a single line in a group

Hi, My Oracle query is returing below o/p ---------------------------------------------------------- Ins trnas value a lkp1 x a lkp1 y b lkp1 a b lkp2 x b lkp2 y ... (7 Replies)
Discussion started by: gvk25
7 Replies

9. Shell Programming and Scripting

joining multi-line file into single lines

Hi, I have a file like mentioned below..For each specific id starting with > I want to join the sequence in multiple lines to a single line..Is there a simple way in awk or sed to do this >ENST00000558922 cdna:KNOWN TCCAGGATCCAGCCTCCCGATCACCGCGCTAGTCCTCGCCCTGCCTGGGCTTCCCCAGAG... (2 Replies)
Discussion started by: Diya123
2 Replies

10. Shell Programming and Scripting

Write the lines in one single line

Hi, I need some iteration to do the following work. Sample: ANS|26-Jan-2012|26|MON|12536.1 ANS|26-Jan-2012|26|TUE|2536.1 ANS|26-Jan-2012|26|THUR|789.1 SED|26-Jan-2013|32|MON|258.1 SED|26-Jan-2013|32|TUE|369.1 SED|26-Jan-2013|32|THUR|2145.1 OUTPUT: ... (3 Replies)
Discussion started by: anshaa
3 Replies
Devices(4)						     Kernel Interfaces Manual							Devices(4)

NAME
Devices - Contains information about devices on the local system that can establish a connection to a remote computer using the uucp pro- gram SYNOPSIS
/usr/lib/uucp/Devices DESCRIPTION
The /usr/lib/uucp/Devices file contains information about the devices on the local system that can establish a connection to a remote com- puter using the uucp program. This file includes information about hardwired, telephone, and TCP/IP communications links. Note that only someone with root user authority can edit the Devices file, which is owned by the uucp login ID. Fields in the Devices File The Devices file must contain a description of each device on the local system that can establish a remote connection using the uucp pro- gram. Each line in the Devices file includes the following fields: Typically specifies the type of hardwired (DIR) or Automatic Calling Unit (ACU) device. Specifies the device name for the port. Specifies the dialer name if the Line entry specifies an 801 dialer. Typi- cally specifies the transmission speed. Specifies a particular type of autodialer (modem) and the token (a defined string of characters) that is passed to the dialer. Valid entries for this field are defined in the /usr/lib/uucp/Dialers file. The fields appear on the line as follows: Type Line Line2 Class Dialer-Token Pairs There must be an entry in every field of a line in the Devices file. If a field does not apply to the particular type of device, use a - (dash) as a placeholder. Lines in the Devices file cannot wrap. Each entry must be on only one line in the file. However, the Devices file can contain blank lines and comment lines. Comment lines begin with a # (number sign). Blank lines are ignored. Enter one of the following keywords in the Type field: Use this keyword, entered in uppercase letters, if your site connects multiple systems over the telephone network using automatic calling units (autodialers or modems). Use this keyword if your site uses hardwired lines to connect multiple systems. Use this keyword if your site uses TCP/IP. Enter the name of a particular remote system hardwired to the local system. The SystemName keyword is the name assigned to each individual system; for example, hera, zeus, or merlin. This field corresponds to the Type field in the /usr/lib/uucp/Systems file. Enter the device name for the line, or port, used in the communications link. For example, use the appropriate tty device name for a hardwired line, such as tty01. For a line con- nected to an ACU (a modem), use a device name appropriate to the dialer, such as tty01 or tty0. For a TCP connection, enter a - (dash) as a placeholder. If you are using an 801 dialer, enter the device name of the 801 ACU in this field. For example, if the entry in the Type field is ACU and the Line field entry (specifying the modem) is tty0, the Line2 field entry (specifying the 801 dialer for the modem) might be tty01. If the device type is not 801, enter a - (dash) in this field as a placeholder. Note that the Line2 field is used only to support older modems that require 801-type dialers. The modem is plugged into one serial port, and the 801 dialer is plugged into a separate serial port. For an ACU or a hardwired line, the Class field can be the speed of the device. In this case, for a hardwired line, enter the transmission rate of the device connecting the two systems. For a telephone connection, enter the speed at which the ACU transmits data, such as 300 or 1200 bps. This field can also contain a letter with a speed (for example, C1200, D1200) to differentiate between classes of dialers. For example, some offices have more than one telephone network, one for internal use and one for external communications. In such a case, it is necessary to distinguish which lines should be used for each connection. For devices that can match any speed, you can specify Any in this field. The Class field in the Devices file is matched against the Class field in the /usr/lib/uucp/Systems file. For example, if the Sys- tems file entry for system hera is: hera Any ACU 1200 3-3-5-2 ogin: nuucp ssword: oldoaktree The uucp program searches for an entry in the Devices file with a Type of ACU and a Class of 1200. Some devices can be used at several speeds. In this case, make multiple entries for the device, specifying each speed on a separate line in the Devices file. If the uucp program cannot connect at the first speed, it will try the other speeds, one after another. For a TCP connection, enter a - (dash) as a placeholder. The Dialer-Token Pairs field specifies a particular type of autodialer (modem) and the token (a defined string of characters) that is passed to the dialer. Valid entries for this field are defined in the /usr/lib/uucp/Dialers file. For a hardwired connection, enter the word direct (note the lowercase d) as the Dialer entry and leave the Token entry blank. For a telephone connection, enter the type of dialer and the token that is passed on to that modem. The Token field entry is either a telephone number or a predefined string used to reach the dialer. For a telephone connection, enter one of the following as the Dialer field entry: A Hayes dialer. A Penril dialer. Other dialers that you can specify by including the relevant information in the /usr/lib/uucp/Dialers file. A TCP/IP connection. Enter TCP in the Dialer field entry if you have also entered TCP in the Type field. Each Dialer field entry included as part of a Dialer-Token Pairs field in the Devices file has a corresponding entry in the Dialers file. If the Token field entry represents a telephone number, enter one of the following in the Token field to specify how the uucp pro- gram should use the telephone number listed in the /usr/lib/uucp/Systems file: The default token in a Dialer-Token Pairs field. The D token specifies that the uucp program should take the phone number listed in the /usr/lib/uucp/Systems file and pass it to the appropriate dialer script (entry) in the /usr/lib/uucp/Dialers file without including a dial-code abbreviation. This token instructs the uucp program to process the phone number by including the data specified in the /usr/lib/uucp/Dialcodes file. Note that if you are using dial-code abbreviations specified in the Dialcodes file for certain telephone numbers, you must enter the T string as the token in those entries in the Dialers file. Leaving the Token field blank is the same as entering D, so a blank is usually sufficient as a token if you have included complete telephone numbers in the /usr/lib/uucp/Systems file. If the Token field does not represent a telephone number, enter the predefined string necessary to reach the dialer. Entries for Hardwired Connections In general, each entry for a hardwired connection consists of two lines. The first line specifies the port (line) that the uucp command uses to connect to the remote system. The second line specifies the remote system. However, if the two systems use a permanent virtual circuit connection, the entry is a single line in the Devices file. To set up a hardwired connection specifying a port and a remote system, make a 2-line entry as follows: Enter the keyword Direct, with an uppercase D, in the Type field in the first line of the entry. Enter the name of the remote system to which you want to connect the local computer over the hardwired line in the Type field in the second line of the entry. Enter the device name appropriate for the hardwired connection used at your site in the Line field in both lines of the entry. Enter a - (dash) for a placeholder in the Line2 field in both lines of the entry. Enter the transmission rate appropriate for the hardwired connection used at your site in the Class field in both lines of the entry. Enter direct (all lowercase) in the Dialer-Token Pairs field in both lines of the entry. To set up a hardwired connection between two systems that use a permanent virtual circuit connection, make a 1-line entry as follows: Enter the name of the remote system in the Type field. Enter the name of the permanent virtual circuit connection in the Line field. Enter a - (dash) for a placeholder in the Line2 field. Enter the transmission rate appropriate for the hardwired connection used at your site in the Class field. Enter direct (all lowercase) in the Dialer-Token Pairs field. Continue adding entries to the Devices file until you have listed each hardwired device connecting the local system to a remote system. Entries for Autodialer Connections In telephone-connection entries, the Type field is specified as an ACU. Enter ACU as the Type field entry in all remote connections established over a phone line. To set up Devices file entries for autodialer connections, make a 1-line entry for each modem as follows: Enter ACU in the Type field. The Line field contains the name of the device that is attached to the modem. Enter the device name appro- priate for your site. Enter a - (dash) as a placeholder in the Line2 field, unless the autodialer is a standard 801 dialer. If the auto- dialer is a standard 801 dialer, enter 801. In the Class field, enter the baud rate appropriate for your modem and line (this can be 300, 1200, 2400, or higher, depending on the modem) or the class of your modem (for example, D2400. Note that if the modem can be used at more than one rate, make a separate entry in the Devices file for each rate. Enter the name of the modem as the Dialer field entry in the Dialer-Token Pairs field. If you are planning to include complete phone numbers in the /usr/lib/uucp/Systems file, leave the Token field blank. (A blank instructs the uucp program to use the default D token.) If you are planning to use dial-code abbreviations specified in the /usr/lib/uucp/Dialcodes file, enter the T token. Continue adding entries to the Devices file until you have listed each connection between the local system and a remote system that uses a telephone line and a modem. Entries for Use with TCP/IP If your site is using the TCP/IP system, include the relevant TCP/IP entry in the Devices file. To set up the file for use with the TCP/IP system, enter a line in the Devices file as follows: Enter TCP in the Type field. Enter dashes in the Line, Line2, and Class fields. Enter TCP as the Dialer field entry and leave the Token field blank. EXAMPLES
Examples of Devices file entries for a number of situations are given below. Setting Up Entries for Hardwired Connections To set up a Devices file entry specifying a port and a remote system, enter: Direct tty0 - 1200 direct zeus tty0 - 1200 direct The Type field lists Direct (for a direct connection) in the first part and zeus (the name of the remote sys- tem) in the second part. The local system is connected to system zeus by way of device tty0, which is listed in the Line field in both parts of the example. The Line2 field contains actual data only when the entry specifies a certain type of telephone connection. A - (dash) is used as a placeholder in other types of connections, as is the case in this example. This tty device transmits at 1200 bps, which is listed in the Class field in both parts of the example. The word direct in the Dialer portion of the Dialer-Token Pairs field indicates that this is a direct connection. To set up a Devices file entry specifying a permanent virtual circuit connection, enter: odin tty01 - 9600 direct The Type field lists the name of the remote system, odin. The Line field contains the name of the permanent virtual circuit connection. A - (dash) is used as a placeholder in the Line2 field. This line transmits at 9600 bps, which is listed in the Class field. The word direct in the Dialer portion of the Dialer-Token Pairs field indicates that this is a direct connection. Setting Up Entries for Autodialer Connections For a standard Hayes modem that can be used at only one baud rate, enter: ACU tty2 - 1200 hayes The Type field is specified as ACU. The Line field is specified with the device name tty2. Because this modem is not an 801 dialer, a - (dash) is used as a placeholder in the Line2 field. The Class field entry is a transmission rate of 1200 baud. The Dialer part of the Dialer-Token Pairs field is specified as a hayes modem, and the Token part is left blank. To specify a standard Hayes modem that can be used at different baud rates, enter: ACU tty3 - 1200 hayes ACU tty3 - 300 hayes These two lines specify the same modem, a hayes modem that can be used at either 1200 or 300 baud, as specified in the Class field. The modem is connected to a device named tty3 (the Line field), and the Line2 field contains the - (dash) placeholder. The Dialer part of the Dialer-Token Pairs field is specified as a hayes modem, and the Token field is left blank. To specify a connection using a standard 801 dialer, enter: ACU tty4 tty5 1200 801 ACU tty6 tty7 300 801 In these entries, the ACU entries are connected to devices named tty4 and tty6, specified in the Line field. In both cases, there is an entry in the Line2 field because a standard 801 autodialer is specified in the Dialer-Token Pairs field. Because 801 is specified as the dialer in these two examples, the Line2 field must contain the device names of the 801 ACUs. The Class field entry is a transmission rate of 1200 baud for the first example and 300 for the second. The Token part of the Dialer-Token Pairs field is blank. Setting Up Entries for Use with TCP/IP If your site is using the TCP/IP system, enter the following in the Devices file: TCP - - - TCP TCP is specified in the Type field. Dashes are used as placeholders in the Line, Line2, and Class fields. TCP is specified as the Dialer field entry with the Token entry left blank. Setting Up Entries for Both Local and Remote Systems The following examples illustrate the entries needed in the Devices file for both local and remote systems in order for the two systems to communicate using the uucp program. The following entries configure local and remote Devices files for a hardwired connection between systems zeus and hera, where zeus is con- sidered the local system and hera is considered the remote system. The hardwired device is tty0. The Devices file on system zeus must contain the following entry in order to connect to the remote system hera: Direct tty0 - 1200 direct hera tty0 - 1200 direct The Devices file on system hera must contain the following entry for communications with system zeus: Direct tty0 - 1200 direct zeus tty0 - 1200 direct The following entries are set up to connect systems venus and merlin over a telephone line using modems. Sys- tem venus is considered the local system, and system merlin is considered the remote system. On both systems, the tty01 device is hooked to a hayes modem at 1200 baud. Both computers include partial phone numbers in their /usr/lib/uucp/Systems files and dialing codes in their /usr/lib/uucp/Dialcodes files. The Devices file on system venus must contain the following entry for the connection to system merlin: ACU tty01 - 1200 hayes T The Devices file on system merlin must contain the fol- lowing entry for the connection to system venus: ACU tty01 - 1200 hayes T FILES
Contains all the configuration files for the uucp program, including the Devices file Contains dial-code abbreviations Specifies initial handshaking on a connection Describes accessible remote systems RELATED INFORMATION
Daemons: uucico(8) Commands: cu(1), uucp(1), uuto(1), uux(1) delim off Devices(4)
All times are GMT -4. The time now is 07:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy