2
votes
4answers
241 views

How to multiply a data file with another index data file?

I want your help in multiplying my data file with another index data file. Both data files have the same number of rows. But the data file have more than 1000 columns while the index data has only one ...
3
votes
3answers
149 views

Transforming text to tabular form

I have a text file with the following structure: aaa bbb ccc ddd eee fff 1 2 3 4 5 6 1.1 1.2 1.3 1.4 1.5 1.6 ggg hhh iii jjj kkk lll 7 8 9 10 11 12 2.1 2.2 2.3 2.4 2.5 2.6 and I want the ...
1
vote
2answers
287 views

Unique lines with unique words

Help me to print unique lines in Linux. Word examples like A B B C C D A E F G H I I J the output should be F G H I I.e., the line should be unique at first and the words in the line should ...
4
votes
1answer
1k views

Replace variable read from a text file (so they can be interpreted)

I tried several stuff with not luck so maybe one of you experts can help me (I hope!). I want to store in a text file some select statement that contain variables like a date: $ cat res.txt select ...
2
votes
3answers
2k views

What is the purpose of -e in sed command?

I can't find any documentation about the sed -e switch, for simple replace, do I need it? e.g. sed 's/foo/bar/' VS sed -e 's/foo/bar/'
1
vote
2answers
866 views

Should I end my text/script files with a newline? [duplicate]

Possible Duplicate: What's the point in adding a new line to the end of a file? What is considered better behaviour: to leave the last letter of the last line to be the last byte of a ...