Search Results

Search: Posts Made By: Gussifinknottle
1,177
Posted By Gussifinknottle
Thanks! @RudiC - I tried and it works :b::). ...
Thanks! @RudiC - I tried and it works :b::).

@Robin - My data files for the inquiry were for a toy example - the grep does not work (which I tried before posting in the forum)

@R.Singh - I need...
1,177
Posted By Gussifinknottle
Remove lines from File.A based on criteria in File.B
Hello,

I have two files of the following form. I would like to remove from File.A where the first three colum matches values in File.B to give the output in File.C

File.A
121 54321 PQR CAT...
1,431
Posted By Gussifinknottle
How to declare an array in UNIX and print the elements with tab delimits?
Hello,

In a shell script, I want to declare an array and subsequently print the elements with tab delimits.

My array has the following structure and arbitrary elements:
myArray=('fgh' 'ijk'...
1,475
Posted By Gussifinknottle
Hello Rudi, Well, I want to use the 2nd form...
Hello Rudi,

Well, I want to use the 2nd form without an alias; the manual tells me that I need to do the following:

ln -s TARGET

Following this logic, I wan to create symlinks in my cwd...
1,475
Posted By Gussifinknottle
Create Sym Links for a series of files
Hello,

I would like to create symbolic links for a series of files in my cwd (after confirming that the links don't already exist). The above files all have a similar prefix, but different...
2,094
Posted By Gussifinknottle
Count occurrence of string (based on type) in a column using awk
Hello,

I have a table that looks like what is shown below:

AA
BB
CC
XY
PQ
RS
AA
BB
CC
XY
RS

I would like the total counts depending on the set they belong to:

if search pattern...
1,017
Posted By Gussifinknottle
More efficient way to print variable values?
Hello,

Through the process of a executing a shell script, I extract the values for a number of variables (arbitrarily declared as a through i) and towards the end I print them out like shown...
2,099
Posted By Gussifinknottle
Oops! I forgot to mention that col2 and col3...
Oops! I forgot to mention that col2 and col3 represent a range with min and max. Therefore [1800-1900] falls between the min and max for 1654 and 2054 and should be excluded.

~Guss
2,099
Posted By Gussifinknottle
awk online to exclude rows
Hello,

I have 3 columns like shown below:

1 1800 1900
2 1765 1900
3 1654 2054
4 1326 1499
5 1540 1765

I want only those rows where column 2 and column 3's values don't fall within...
2,900
Posted By Gussifinknottle
Percentage / Multiplication in Shell Script
Hello,

I am trying to compute the percentage in a script as shown below:



PerCover=`echo "scale=2 ; 100 \* ($InputCover/$Total)" | bc`



However the PerCover value is blank/null. What...
3,807
Posted By Gussifinknottle
Hello #Don: matrix is a tab delimited file....
Hello

#Don: matrix is a tab delimited file. I have used the -d option successfully for other delimiters (space, ',').

#RudiC: I am just not getting an output as I ran it.

#bakunin: I tried...
3,807
Posted By Gussifinknottle
Use variables for cut command
#!/bin/sh

I have a file matrix.pair.cols that contains numbers like shown below:

case1 17 18
case2 1 2
case3 4 5
case4 .. ..


I want to cut the column numbers mentioned in col2 and 3...
2,701
Posted By Gussifinknottle
Ls -1 at Command Line vs in a Shell Script
Hello,

I have symbolic links to a bunch of directories (all starting with the letter X) in the cwd. When I run the following on the command line, I get the list as I want it.

ls -1 X* >...
6,632
Posted By Gussifinknottle
Duh me! Thanks Yoda. I had c&p'd the $y and...
Duh me! Thanks Yoda. I had c&p'd the $y and forgot to take the $ sign off!

~Guss
6,632
Posted By Gussifinknottle
Divide a numerical data column by a variable
Hello,

I have two files, f1 and f2. f1 has 5 columns like so:

a b c d 154
e f g h 365
.....

f2 has two columns, the first column contains the name of the above file and second column...
4,903
Posted By Gussifinknottle
Appending "_" (underscores) to variable names
Hello,

I have a file, inputs.list that contain prefixes to files that are inputs for a program

inputs.list
A
B
C
D
E
...

My files are of the format A_1, A_2, B_1, B_2 and so on. I am...
1,402
Posted By Gussifinknottle
Hi Corona688 Worked like charm! ~Guss
Hi Corona688

Worked like charm!

~Guss
1,402
Posted By Gussifinknottle
Run executable in one directory and then move to another successively
Hello,

I have several hundred subdirectories which contain input files for a binary executable. I need to get into each of the subdirectories, run the executable and then move to the next one and...
5,679
Posted By Gussifinknottle
Split a file and give custom names
Hello,

I want to split a file based on an input list file that contains the lines each split should have + a corresponding file name.

#!/bin/sh
# sed -n 'start_line_#,end_line_#p'...
8,227
Posted By Gussifinknottle
awk for concatenation of column values
Hello,

I have a table as shown below. I want to concatenate values in col2 and col3 based on a value in col4.


1 X Y A
3 Y Z B
4 A W B
5 T W A


If col4 is A, then I want to concatenate...
3,050
Posted By Gussifinknottle
Thanks! neutronscott, Actually your solution...
Thanks! neutronscott,

Actually your solution will be applicable for my current analysis.

~Guss
3,050
Posted By Gussifinknottle
Cut from tables based on column values
Hello,

I have a tab-delimited table that may contain 11,12 or 13 columns. Depending on the number of columns, I want to cut and get a sub table as shown below. However, the awk commands in the...
2,690
Posted By Gussifinknottle
Hi Jim, My file1 (6 rows x 4 columns) is: ...
Hi Jim,

My file1 (6 rows x 4 columns) is:
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4

My file2 (4 rows x 4 columns) is:
5 6 7 8
5 6 7 8
5 6 7 8
5 6 7 8

paste file1 -d '\t'...
2,690
Posted By Gussifinknottle
paste two tables of different sizes and fill blanks with NaN
Hello,

I am pasting two tables of 6x4 and 4x4 together to get a 10x8 output. I want to fill the blank values with a NaN (Not a Number). How can I do this?

Thanks,
Guss
6,970
Posted By Gussifinknottle
Find and Replace based on a list
Hello,

I have two files 'Master' and 'Rename'. Rename has two columns, the first containing old names and the second new names. I want to replace the old names in the 'Master' file with the new...
Showing results 1 to 25 of 78

 
All times are GMT -4. The time now is 07:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy