How to select more than 1 line,copy those selected more than 1 line(multiple lines) ,and paste them.In NANO
Apologies. I've been out of Unix for 14 years, and the gears have rusted. Also, Unix has changed - enough similarities to memory that I'm pretty comfy though.
Glad to see lots of info available via google. However changes are going to take getting used to. Have set up a testbed of 3 nearly identical machines, hoping to make an (at home) private network where I can automate installs and set-ups using NIS and NFS (Similar to work I once did).
Have found useful scripts interspersed with comments, would like to copy and paste them to a bash script that:
Reads the line.
Echos the line.
Reads the reply.
Executes what is typed.
Essentially, by making myself type (or copy & paste) the commands I think I'll become familiar.
Figured I'd use a spreadsheet, select the file, and paste into column B of the spreadsheet. In column A I'd paste:
echo "
and in column C I'd paste:
"
Then I'd cut and paste into a text document, insert the lines:
read A
$A
behind every command necessary to the actual task.
Figured I'd have to escape the ' and ".
Ran a test (test.bash):
#!/bin/bash
for i in `seq 1 10`;
do
echo "Enter a command:"
read A
echo "Trying $A"
$A
done
works fine when I type
ls -alg
but not so when I type
ls -alg | grep dwrx
so I'm wondering if someone has a suggestion?
Thanks for any ideas.
Hello everyone,
I had a trouble with my sources list. The trouble was line 56 malformed in sources list, so I couldn't update my prograns or download new ones. I tried one solution I heard of, which consisted in adding to ## at the beginning of the line. As I didn't know which line was 56 I added the ## at various lines to make sure that line 56 was changed. Unfortunately, it didn't work and the message repeated itself again. I accessed the sources list again, but this time I probably forgot to save the changes I made and now the sources list is empty, which it is a much graver problem. Could anyone tell me how to fix it? Will it suffice to send me a copy of the current sources list in Lubuntu/Ubuntu so that I could paste it in the terminal? Thank you so much for any help you could give me.
Bruno Zero
The previous Debian versions had root terminal application that I could use with line commands that I could copy/paste. I cannot find that anymore in Debian, only XTerm which I cannot copy/paste text from it. Any idea what I could use?
Hello everyone,
Although it seems easy, I've been stuck with this problem for a moment now and I can't figure out a way to get it done.
My problem is the following:
I have a file where each line is a sequence of IP addresses, example :
Line 1: 10.0.01 10.0.0.2
Line 2 : 10.0.0.5 10.0.0.1 10.0.0.2
...
What I'd like to do, is to remove lines that are completely matched in other lines. In the previous example, "Line 1" would be deleted as it is contained in "Line 2".
So far, I've worked with python and set() objects to get the job done but I've got more than 100K lines and sets lookups are becoming time consuming as the program goes :/
Thanks for you help
Hi,
I have been trying to get information on how to process the output of a tcl file (aodv and leach protocol using mannasim) which I got on my command line Iinterface. Actually, I don't even know the keywords to search as I am new to this and other minor attempts haven't yielded positive results., I know there is usually a trace file but I can't see any. All I see is on my command line.
I also observe that it took the space on the entire screen and I can't copy the output from the start ( I could only copy from node 19 out of 30 nodes) because of the huge number of output lines.
The last thing I havent been able to figure ou is whether temperature is equivalent to energy Iin mannasim as mannasim has only temperature and carbon dioxide?
Thanks
I have a log file with a header (which I can skip with awk), and a footer, which I need to find a way to remove. The goal is to extract the middle lines from a file. Specifically, there is a header (1 line) and a footer (1 line).
The only way I can figure out how to do this is if I already know how many lines are in the file to begin with. For example, if the file looks like this:
line 1 (header)
line 2 (interesting line)
line 3 (interesting line)
line 4 (footer)
I just want to extract the middle "interesting lines" without the header/footer lines.
I can't use grep to remove the header/footer, because I don't know what those lines will contain, only that they exist and are exactly 1 line each. In general, I don't know how many lines are in the file.
I have a problem with the putty ssh connection. The operating system is Windows 8.
How do I select a few lines and remove them. Using the mouse and shift + arrow keys on the keyboard does not work properly.
It seems like it happened when I upgraded to 14.04. When I first open Firefox the line isn't there, but as soon as I enter something and the site comes up, there is a solid black line over the address bar. (see screenshot) When I put the cursor on the right end of the black line and hit the left arrow (not the backspace), the line (space by space) disappears. Any ideas? Thanks!
I know that '>' and '>>' will redirect output to a file
However, how does one keep this output on the same line as the previous line?
'echo -n' will stop a trailing new line but for terminal redirection?
I have two files which has exact same number of lines.
I want first line of first file should be filename of new file and content of this new file should be first line of second file.
Then second line of first file should be filename of again new file and content of this new file should be second line of second file.
then third line of first file should be filename of again new file and content of this new file should be third line of second file.
and so on...
I am trying to do it using for loop but I am not able to create two for loops.
This is what I have done
Code:
IFS=$'\n'
var=$(sed 's/\"http\(.*\)\/\(.*\).wav\"\,\".*/\2/g' 1797.csv) # filenames of all files
var2=$(sed 's/\"http\(.*\)\/\(.*\).wav\"\,\"\(.*\)\"$/\3/g' 1797.csv) # contents of all files
for j in $var;
do
#Here I do not know how to use $var2
done
Please help.