10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
whether it is possible in awk to create your own header file like in C
if so someone give me awk equivalent for below one
$ cat foo.h
int add(int a,int b)
{
return(a+b);
}
$ cat main.c
#include<stdio.h>
#include"foo.h"
void main()
{
int number1=10,number2=10,number3;
number3 =... (5 Replies)
Discussion started by: Akshay Hegde
5 Replies
2. Shell Programming and Scripting
Greetings!
I have been trying to find out a way to take a CSV file with a large number of rows, and a very large number of columns (in the thousands) and convert the rows to a single column of data, where the first row is a header representing the attribute name and the subsequent series of... (3 Replies)
Discussion started by: tntelle
3 Replies
3. Shell Programming and Scripting
Hi,
I have a file which looks like this:
FID IID MISS_PHENO N_MISS N_GENO F_MISS
12AB43131 12AB43131 N 17774 906341 0.01961
65HJ87451 65HJ87451 N 10149 906341 0.0112
43JJ21345 43JJ21345 N 2826 906341 0.003118I would... (11 Replies)
Discussion started by: kayakj
11 Replies
4. Shell Programming and Scripting
Hi forum, I am really hoping somebody can please help me here.
I have a dataset in xyz format, with longitude as x, latitude as y and data readings as z.
eg.
0 90 -8
1 90 23
2 90 -4
etc etc etc
What i am looking to do is format the data so that x and y are untouched, however in... (2 Replies)
Discussion started by: shlam16
2 Replies
5. Shell Programming and Scripting
Hi Folks,
I have a file like:
mainfile.txt:
-------------
file1 abc def xyz
file1 aaa pqr xyz
file2 lmn ghi xyz
file2 bbb tuv xyz
I need output having two files file1 and file2.
file1:
------
Name State Country
abc def xyz
aaa pqr xyz
file2: (3 Replies)
Discussion started by: tanmay.gemini
3 Replies
6. Shell Programming and Scripting
Hi,
My variable has value as this:
tvar1="bool_risk_enabled" Boolean "true"
Now I need to replace this true with false. Which is the best way to do this? Can we do this with sed command?
Please help me.
---------- Post updated at 05:23 PM ---------- Previous update was at 05:00 PM... (2 Replies)
Discussion started by: pravintse
2 Replies
7. Shell Programming and Scripting
How can i use sed to extract the user name and home directory from the /etc/passwd/ file on my server. (11 Replies)
Discussion started by: Pauline mugisha
11 Replies
8. Shell Programming and Scripting
Hi,
I have two issues:
I have one file say file1.dat and its over 3GB. It contains pipe delimited fields. The first line in the file is the header field which tells the column names etc. and from second line it's the data fileds with pipe delimited. Something like below:
... (5 Replies)
Discussion started by: rkumar28
5 Replies
9. Shell Programming and Scripting
$ cat log.txt
Name Age Sex Lcation nfld alias xsd
CC 25 M XYZ asx KK Y
BB 21 F XAS awe SS N
SD 21 M AQW rty SD A
How can I replace the column with header "Lcation" with the column with header "alias" and delete the "alias" column?
so that the final output will become:
Name Age Sex... (10 Replies)
Discussion started by: jkl_jkl
10 Replies
10. Shell Programming and Scripting
I have been searching around the forums here trying to find a solution to my problem but not getting anywhere but closer to baldness.
I have a 20 column pipe "|" seperated text file. The 14th variable doesnt always exist, but will have the format of YYYYMM or YYYY if it does.
I need to take... (2 Replies)
Discussion started by: r0sc0
2 Replies