10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have the following awk script that I am using to find the max value in the file and print results.
awk 'BEGIN {MAX=-1E100} {for (x=2; x<=NF; x++) if ($x>MAX) {MAX = $x; C1 = $1}} END {print substr(C1,1,11), substr(C1,13,4), substr(C1,18,2), MAX}' ABC*
Input (ABC*)
... (6 Replies)
Discussion started by: ncwxpanther
6 Replies
2. Shell Programming and Scripting
Hi
I have two files. One is a text file consisting of sentences i.e. INPUT.txt and the second file is SEARCH.txt consisting of two or three columns. I need help to write a script to search the second column of SEARCH.txt for each set of five words (blue color as set one and green color as set... (6 Replies)
Discussion started by: my_Perl
6 Replies
3. Shell Programming and Scripting
Hi All,
Can you please guide me to search a string in a particular column of file and return the line number of the line where it was found using awk. As an example :
abc.txt
7000,john,2,1,0,1,6
7001,elen,2,2,0,1,7
7002,sami,2,3,0,1,6
7003,mike,1,4,0,2,1
8001,nike,1,5,0,1,8... (3 Replies)
Discussion started by: arunshankar.c
3 Replies
4. Shell Programming and Scripting
I have a large system housekeeping script, that I want to use with zenity.
One of the processes will be to conduct a virus scan, which I can easily do with something like:
clamscan -rv / | zenity --text-info --width 640 --height 640
The problem is that it needs user intervention by... (2 Replies)
Discussion started by: stumpyuk
2 Replies
5. Shell Programming and Scripting
Hi,
I have to process four source text files with possibility to contain carriage return on the particular column. Thus, i need to replace the carriage return with 3 colons <:::>
The particular column position in the source files is not fix but the name is fixed. That is, say for example,... (4 Replies)
Discussion started by: agathaeleanor
4 Replies
6. Shell Programming and Scripting
Hi all,
I have a huge csv file with the following format of data,
Num SNPs, 549997
Total SNPs,555352
Num Samples, 157
SNP, SampleID, Allele1, Allele2
A001,AB1,A,A
A002,AB1,A,A
A003,AB1,A,A
...
...
...
I would like to write out a list of unique SNP (column 1). Could you... (3 Replies)
Discussion started by: phoeberunner
3 Replies
7. Shell Programming and Scripting
Hey guys i wrote this code but it wont give me anything.
any ideas?
ans=$(zenity --list --text "Do you want to set USER/GROUP quota?" --radiolist --column "Choice" --column "Desc" TRUE Hi FALSE Bye); echo $ans
if ; then
./example.sh
else
exit
fi (2 Replies)
Discussion started by: dplate07
2 Replies
8. UNIX for Dummies Questions & Answers
Hello
I've a script where I've a zenity --question because I want to ask the user if he is sure that he wants to delete the file.
The problem is, if the user says "OK" it deletes nad if the user says cancel it deletes :)
How can I close the script if the user says cancel??
thanks (3 Replies)
Discussion started by: ruben.rodrigues
3 Replies
9. Shell Programming and Scripting
Hi!
does someone know how can I setup a zenity entry "box" such that comes with the data as default.
like it appears an entry box already with the data but it can be modify.
thanks (2 Replies)
Discussion started by: ruben.rodrigues
2 Replies
10. Shell Programming and Scripting
Dear All
I had below mention file as my input file.
87980457 Jan 12 2008 2:00AM 1 60 BSC1
81164713 Jan 12 2008 3:00AM 1 60 BSC2
78084521 Jan 12 2008 4:00AM 1 60 BSC3
68385193... (3 Replies)
Discussion started by: jaydeep_sadaria
3 Replies