Hi,
Could somebody help me to solve this problem?
I copy here part of the table (I hope it will keep the format when you receive this thread):
ESO 268-044 4a 70.0 9.0 272.3 251.8 113.1 2.2 14.5 10 2
ESO 323-042 4c 54.0 9.0 160.1 4.0
ESO 358-006 4b 48.5...
hi
I have file names like:
"data1", "esdu2sdt" ... "da15efe"
I would just like to extract number from filenames. There is absolutely no rule where the numbers are in the names. How to do this?
thanks
k.
it does not work in this way ... sure the syntax is ok? I am trying to run it with in BASH like:
usage: cleanBlanko "inputFile.csv"
function cleanBlanko(){
for i in `find -name "$1" -print`; do
echo $i "=============>" "$(dirname $i)"/"$(basename $i .csv)"_delBl.csv;
tr -d ':blank:' <$i...
Hi,
I have datafile (comma separated) like this one
342, 0.00279, 0.01163, 3.03125
342, 0.00279, 0.01163, 3.03125
342, 0.00279, 0.01163, 3.03125
342, 0.00279, 0.01163, 3.03125
..................................
and I would like to delete empty...
Thanks,
I am trying to generalise this that is to match 2 files usin 2 columns in both files. For example to match 1 and 2 columns of file1 with columns 3 and 4 of file2
#USAGE:test_awkcrossmatch file1 1 2 file2 3 4 output
test_awkcrossmatch() {
awk -F, -v col1_fl1="$2" -v col2_fl1="$3"...
I wrote awk for matching of 2 files using the same columns like this:
#USAGE: awkcrossmatch file1 file2 2 output
test_awkcrossmatch() {
awk -F, -v col1="$3" 'NR==1 { h=$0 ; next}
{v=$col1} NR==FNR {a[v]=$0; print v, a[v]; next}
NR==1 { print h FS $0 ; print v; next }
v in...
Hi,
I would like to cross-match 2 files with awk using different columns. Example:
file1 with 3 CSV columns:
A1,B1,C1
1,2,3
4,5,6
7,8,9
file2 similary:
A2,B2,C2
2,11,13
7,34,56
8,32,12
Matching 2 files using B1 column of the first file and A2 column of the second should give...
hi,
i would like to substitute a substring with the given string in filanames. I wrote this script that use awk:
function subFlNmPart(){
for i in `find -name "$1" -print`; do
bn="$(basename $i)";
#eval o=\"$( awk -v inFl=$bn -v target=$2 -v word=$3 'BEGIN{
sub(target, word, inFl)...
hi,
I would like to write out certain columns (number is not fixed) from datafile. My program starts like:
echo "chose columns separated by commas";
read col;
awk -v c=$col 'BEGIN{
search=",";
n=split(c,a,search);
for (i=1;i<=n;i++) {
print a[i];
}}{......}' dataFile.dat >...
Hi
I would like to sort datatable by column 2 for example. I wrote this:
awk '{a[$2>=10?$2:0$2]=$0} END {n=asorti(a,dest); for
(i=1;i<=n;i++){print dest[i]}}' sample1.dat
It works but fails when I have negative numbers in datatable. Is there some quick solution for this?
thanks
k.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.