Copy lines from one file to another with mc

Hi,
How can i use midnight commander to copy some lines from one file to another ?

Thanks!
LVL 4
Cristi_EAsked:
Who is Participating?
 
torimarConnect With a Mentor Commented:
If you wish to use MC, here's a way that should comply with most setups:

- in MC, press F9 for the menu, then select 'Options > Configuration' and make sure "Internal Editor" is selected
- Open the file you wish to copy from with F4
- Take the cursor to the beginning of the block you wish to copy, then press F3 for mark-up mode, then mark the block (or simply use the mouse for marking)
- Press CTRL + F, confirm to copy to the default temporary file "cooledit.clip"
- Close the source file
- Open the target file with F4
- Move the cursor to the paste location
- Press SHIFT + F5
- Confirm to paste from the default temp file "cooledit.clip"

Instead of using shortcuts, you could also just press F9 inside the editor to enter its pulldown menu, then use the File menu to copy/paste to file.
0
 
mccrackyCommented:
Why with mc?  Use bash.

Grab someline from somefile and append it to otherfile:

grep  someline somefile >> otherfile
0
 
Cristi_EAuthor Commented:
Hi torimar,
It worked just great!

I thought this is a routine task in linux. I'm surprised to see that the answer has come with difficulty!

Thanks !
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.