some vi help needed


 
Thread Tools Search this Thread
# 1  
some vi help needed

Hi,

I have a file with following contents

Code:
This is 
a text file. It is a long string.


I wanted to know how to how to move the contents of the second line (a text file. It is a long string.) to the end of file line so that it becomes

Code:
This is a text file. It is a long string.

# 2  
To keep the forums high quality for all users, please take the time to format your posts correctly.

First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags [code] and [/code] by hand.)



Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.

Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.

Thank You.

The UNIX and Linux Forums
# 3  
maybe a hint is to Join the two lines Smilie
# 4  
got it...thanks Smilie
 

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help Needed

Hi I have vi file in solaris machine with following information as below Firstname: andy Lastname: Mervyn Phone : 12345 But, I need output in excel format in separate column as below using shell script Firstname. Lastname. Phone Andy. Mervyn. 12345 (5 Replies)
Discussion started by: buzzme
5 Replies

2. UNIX for Dummies Questions & Answers

help needed

For a student file with the following fields, rollno, name, marks. Generate 2 files ‘Pass’ and ‘Fail‘containing records of student who have passed or failed. Also count the number of students who have passed or failed. (1 Reply)
Discussion started by: jainitai
1 Replies

3. Linux

Help needed

hi experts, i am a beginner in AIX..recently got a chance to work with unix team. we have an interface server through which we connect to production servers.. there were lot of files inside root (/) of that interface server owned by different ppl...by mistake i changed the ownership and group of... (1 Reply)
Discussion started by: vinimerwe
1 Replies

4. Shell Programming and Scripting

Help on these two needed ...!!

Folks I need help on following two. 1. Say i am getting two values like this ::1:953 and :::8005 I need to replace "::" (first two colons with a * ).I can get these values in a variable.How to tweak this variable to separate out the way i want? Anything after third ":" should be set... (9 Replies)
Discussion started by: ak835
9 Replies

5. Shell Programming and Scripting

help needed...

Guys, There is a file where there are 1000s of records. In the file if some condition satisfies in a certain TAB record (TAB would be first 3 digits of a certain record) then move TAB and all the records (or lines) after TAB to new_file, until another TAB record is encountered in the same... (1 Reply)
Discussion started by: Prat007
1 Replies

6. UNIX for Dummies Questions & Answers

little help needed..

hi everyone i'm a noob trying to learn unix language.. but seems like i got no leads on how to start.. i'm playing with the 'ps' command.. i'm trying to show the pid, ppid, username, command, cpu utilization (in desc order), process start time and process status.. all in a command.. am i able... (3 Replies)
Discussion started by: hilofat
3 Replies

7. AIX

Little help needed.

Hello, I am quite new to AIX, but have Linux experience. Iam facing a peoblem with AIX 5.2 running on a 43p Model 150 (RS6000). I tried everyting and i cant have the network to run properly. :confused: /etc/hosts looks like this: 127.0.0.1 loopback localhost 192.168.XXX.XXX... (5 Replies)
Discussion started by: Netghost
5 Replies

8. Shell Programming and Scripting

Help needed

Hi All, I need help in writing a script. I need a script that takes a name as a parameter and executes the follwoing steps. The name will be like BUDGET01_BARE_DLY_YYYYMMDD, BUDGET02_BARE_DLY_YYYYMMDD etc. The YYYYMMDD represent today( systemdate). This names have to be passed as... (2 Replies)
Discussion started by: dsravan
2 Replies

9. UNIX for Dummies Questions & Answers

Help needed

Hello I am a newbie and want to learn unix . Does unix and linux are one and same. I have red hat linux cd but i want to take advice from some one wheather unix and linux are same. If not ,where i'll get a Unix os setup and how i'll install it. If linux would do then how should... (3 Replies)
Discussion started by: hunter87
3 Replies

10. Shell Programming and Scripting

Help needed

The following program works fine; however, I don't understand the following line of it. cp $1 $1.BAK-$i You can make backup copies of a file using the following program. What is '' -$i '' ? If you have a file named 'text' , this will create '' text1.BAk , text.BAK2, text.BAK3, etc.... (9 Replies)
Discussion started by: Toxic
9 Replies

Featured Tech Videos