Search Results

Search: Posts Made By: rdrtx1
5,375
Posted By rdrtx1
awk 'ORS=(NR % 3) ? RS : "\n"' RS=- File.txt >...
awk 'ORS=(NR % 3) ? RS : "\n"' RS=- File.txt > outfile.txt
13,759
Posted By rdrtx1
grep name nameserver.txt | cut -d" " -f1,5...
grep name nameserver.txt | cut -d" " -f1,5 --output-delimiter="." | cut -d"." -f1,7 --output-delimiter=" "
2,675
Posted By rdrtx1
same as above but total included: awk 'BEGIN {...
same as above but total included:
awk 'BEGIN { delta = (delta == "" ? 2 : delta) ; max=20 }
{
if ($1 > max) {
maxf++;
maxc+=$2;
} else {
bucketNr = int(($1+delta) / delta)
cnt++...
4,297
Posted By rdrtx1
It prints the line occurrence of column 1 ($1)....
It prints the line occurrence of column 1 ($1). a[$1]++ fails for the first occurrence increment since the array value for that key does not exist. The ! means not true so the expression is evaluated...
4,297
Posted By rdrtx1
try: sort -k9 -n -r file | awk '!a[$1]++' ...
try:

sort -k9 -n -r file | awk '!a[$1]++'

In output shown above, what happened to the max line for chr1_17232_18061?
12,437
Posted By rdrtx1
more simple? ...
more simple?
CONDITIONS="1=CT,4=US_10,60=CT_US_10"

awk -v CONDITIONS="${CONDITIONS}" -F, '
BEGIN { c=split(CONDITIONS, cn, "[=,]"); }
{n=0;
for (i=1; i<=c; i+=2) if ($cn[i]==cn[i+1]) n+=2;
if...
1,562
Posted By rdrtx1
Can you make a small script to verify that it is...
Can you make a small script to verify that it is not working? i. e.:
set -x

PASSWORD="passwordwith@init"

if [[ "$PASSWORD" != "passwordwith@init" ]]; then
echo testing_code
else
echo...
4,258
Posted By rdrtx1
awk '{ line[NR]=$0; pp[NR] = $2 ll[NR] = $1...
awk '{
line[NR]=$0;
pp[NR] = $2
ll[NR] = $1
x[NR] = $4
y[NR] = $5
z[NR] = $6
rc[$1,$2]++
} END {
first = 1
count = 0
for ( i=1 ; i <= NR ; i++ ) {
if (pp[i] == pp[i+1] && ll[i] ==...
12,437
Posted By rdrtx1
an ex.: CONDITIONS="1=CT,2=US_10,3=CT_US_10" ...
an ex.:
CONDITIONS="1=CT,2=US_10,3=CT_US_10"

CON='$1 == "CT" && $4 == "US_10" && $60 == "CT_US_10"'

awk -v CONDITION="${CON}" -F, '
BEGIN {
c=split(CONDITION, cons, " *&& *");
for (i=1;...
4,493
Posted By rdrtx1
awk ' (! h++) {print "transcript_id",...
awk '
(! h++) {print "transcript_id", "gene_name", "description", "chromosome", "strand", "transcript_start", "transcript_end", "gene_start", "gene_end";}
$9 ~ /ID=.*Name=/ {n=$9; sub(".*Name=",...
4,839
Posted By rdrtx1
awk -F, 'v[$1,$2] &&...
awk -F, 'v[$1,$2] && ($8-v[$1,$2])>1;{v[$1,$2]=$8;}' file
4,493
Posted By rdrtx1
awk ' (! h++) {print "transcript_id",...
awk '
(! h++) {print "transcript_id", "gene_name", "description", "chromosome", "strand", "transcript_start", "transcript_end", "gene_start", "gene_end";}
$9 ~ /ID=.*Name=/...
4,564
Posted By rdrtx1
try: awk -F, ' function interpolate(lat1,...
try:
awk -F, '
function interpolate(lat1, lon1, t1, lat2, lon2, t2, p) {
for (i = 1; i <= (t2 - t1); i++) {
printf "%.2f,%.2f,%.1f\n",
lat1 + (t2 - t1) * (lat2 - lat1) / p,
lon1 + (t2 - t1) *...
4,733
Posted By rdrtx1
try: if [ "$line" != "\n" ] in case $line is an...
try: if [ "$line" != "\n" ] in case $line is an empty string.
2,197
Posted By rdrtx1
give space. otherwise it will think it's another...
give space. otherwise it will think it's another variable.
4,077
Posted By rdrtx1
so, fuz or fuzzyanimals (or any string in...
so, fuz or fuzzyanimals (or any string in between) will all evaluate "cat dog"? Why not just use fuz?
2,925
Posted By rdrtx1
Is this a duplicate post? See example on...
Is this a duplicate post?

See example on other post:
sed -i 's/$$EDWS_DATE_INSERT *=.*/$$EDWS_DATE_INSERT='"$(date "+%y%m%d")"'/' abc.txt
5,688
Posted By rdrtx1
See updated post to fix quotes.
See updated post to fix quotes.
5,688
Posted By rdrtx1
sed -i 's/$$EDWS_DATE_INSERT...
sed -i 's/$$EDWS_DATE_INSERT *=.*/$$EDWS_DATE_INSERT='"$(date "+%y%m%d")"'/' abc.txt
5,711
Posted By rdrtx1
fo_ip=$(sed -n '/FailoverSystem/,/}/{/^ *address...
fo_ip=$(sed -n '/FailoverSystem/,/}/{/^ *address /{s/ *address *//;{p;q}}}' config.boot)
echo "$fo_ip"
1,916
Posted By rdrtx1
just an idea: instead of having a loop monitoring...
just an idea: instead of having a loop monitoring the jobs while they run, add a wait after the background jobs are submitted then add a loop to look for failed jobs in the log files and resubmit...
9,639
Posted By rdrtx1
ASCII is a subset of UTF-8. But if there is a...
ASCII is a subset of UTF-8. But if there is a need to transliterate, try something like:
iconv -f UTF-8 -t ASCII//TRANSLIT < input_file
3,152
Posted By rdrtx1
[[:digit:]]E[[:digit:]]
[[:digit:]]E[[:digit:]]
2,776
Posted By rdrtx1
perl -pi -e...
perl -pi -e 's/('$PROCNAME'.Merge.exchMon.'$CODE'.'$T_QSTART'.*)'$CURRENT_QSTART'(.*read)/${1}'$NEW_QSTART'${2}/g' $CONFIG
3,725
Posted By rdrtx1
Can you post a sample input file for the second? ...
Can you post a sample input file for the second?

Updated sample runs with updated second script:
cat << NODES > db_status.txt
Name | Status
------------------
DB 1 | UP
DB 2 | UP
DB...
Showing results 1 to 25 of 448

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