[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Copy lines from one file to another with mc

Posted on 2011-02-18
3
Medium Priority
?
604 Views
Last Modified: 2012-05-11
Hi,
How can i use midnight commander to copy some lines from one file to another ?

Thanks!
0
Comment
Question by:Cristi_E
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 12

Expert Comment

by:mccracky
ID: 34927235
Why with mc?  Use bash.

Grab someline from somefile and append it to otherfile:

grep  someline somefile >> otherfile
0
 
LVL 35

Accepted Solution

by:
torimar earned 2000 total points
ID: 34946235
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
 
LVL 4

Author Comment

by:Cristi_E
ID: 34949569
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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month13 days, 15 hours left to enroll

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question