10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi all,
trying this using shell/bash with sed/awk/grep
I have two files, one containing one column, the other containing multiple columns (comma delimited).
file1.txt
abc12345
def12345
ghi54321
...
file2.txt
abc1,text1,texta
abc,text2,textb
def123,text3,textc
gh,text4,textd... (6 Replies)
Discussion started by: shogun1970
6 Replies
2. Shell Programming and Scripting
The following code transform the matrix to columns. Is it possible to do it other way around ( get the input from the output) ?
input
y1 y2 y3 y4 y5
x1 0.3 0.5 2.3 3.1 5.1
x2 1.2 4.1 3.5 1.7 1.2
x3 3.1 2.1 1.0 4.1 2.1
x4 5.0 4.0 6.0 7.0 1.1
output
x1 y1 0.3
x2 y1 1.2
x3... (1 Reply)
Discussion started by: quincyjones
1 Replies
3. Shell Programming and Scripting
Hi, is it possible to add a number to all the values in a file and log transform them using awk. thanx in advance
input
name c1 c2 c3 c4
r1 0 0.2 0.3 0.4
r2 0 0 0 1
r3 1 0 0 0
r4 0 0 1 ... (1 Reply)
Discussion started by: quincyjones
1 Replies
4. Shell Programming and Scripting
Hello,
I want to grep a log ("server.log") for words in a separate file ("white-list.txt") and generate a separate log file containing each line that uses a word from the "white-list.txt" file.
Putting that in bullet points:
Search through "server.log" for lines that contain any word... (15 Replies)
Discussion started by: nbsparks
15 Replies
5. Shell Programming and Scripting
Hi Friends,
I have an input matrix file like this
Col1 Col2 Col3 Col4
R1 1 2 3 4
R2 4 5 6 7
R3 5 6 7 8
I would like to consider only the numeric values without touching the column header and the row header.
I looked up on the forum's search, and I found this. But, I donno how to... (3 Replies)
Discussion started by: jacobs.smith
3 Replies
6. Programming
Hi all,
I pass to the transform algorithm two vectors, and the suma function.
#include <algorithm>
#include <iostream>
#include <iterator>
#include <vector>
using namespace std;
class Duo{
public:
int one;
int two;
};
Duo suma(Duo first, Duo last){
Duo ret;
... (1 Reply)
Discussion started by: santiagorf
1 Replies
7. UNIX for Dummies Questions & Answers
How do I use awk to log transform the fifth column of a tab-delimited text file? Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies
8. Shell Programming and Scripting
I'm new to scripting and was wondering if there was a way to accomplish what I want below using shell script(s).
If there is a log file as follows, where the id is the unique id of a process, with the timestamp of when the process began and completed displayed, would it be possible to find the... (3 Replies)
Discussion started by: dizydolly
3 Replies
9. Shell Programming and Scripting
Hi all,
I'm fairly new to shell scripting. My problem: I'm getting a string, "$XXOGL_TOP", from a database table. I then want to get the value of this variable in the shell script (which is a search path). But it doesn't dissolve but remains a string "$XXOGL_TOP". Any ideas on how to get the... (3 Replies)
Discussion started by: Kerstin
3 Replies
10. UNIX for Dummies Questions & Answers
Hello. I'm trying to use the awk command to convert certains fields to lgo base 2, not base 10.
I'm trying command lines like:
awk '$2 $5 $7 {print log(2)($2), log(2)($5), $7) filein.txt > fileout.txt
I'm trying to make a deadline.
Thanks for helping a newbie. Here's some fresh karma... (1 Reply)
Discussion started by: jmzcal
1 Replies