Search Results

Search: Posts Made By: rdrtx1
7,007
Posted By rdrtx1
awk 'ORS=(NR % 3) ? RS : "\n"' RS=- File.txt >...
awk 'ORS=(NR % 3) ? RS : "\n"' RS=- File.txt > outfile.txt
14,855
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=" "
3,163
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,984
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,984
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?
14,878
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,931
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,862
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] ==...
14,878
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,712
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=",...
5,376
Posted By rdrtx1
awk -F, 'v[$1,$2] &&...
awk -F, 'v[$1,$2] && ($8-v[$1,$2])>1;{v[$1,$2]=$8;}' file
4,712
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,965
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) *...
5,230
Posted By rdrtx1
try: if [ "$line" != "\n" ] in case $line is an...
try: if [ "$line" != "\n" ] in case $line is an empty string.
2,497
Posted By rdrtx1
give space. otherwise it will think it's another...
give space. otherwise it will think it's another variable.
4,613
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?
3,165
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,986
Posted By rdrtx1
See updated post to fix quotes.
See updated post to fix quotes.
5,986
Posted By rdrtx1
sed -i 's/$$EDWS_DATE_INSERT...
sed -i 's/$$EDWS_DATE_INSERT *=.*/$$EDWS_DATE_INSERT='"$(date "+%y%m%d")"'/' abc.txt
6,203
Posted By rdrtx1
fo_ip=$(sed -n '/FailoverSystem/,/}/{/^ *address...
fo_ip=$(sed -n '/FailoverSystem/,/}/{/^ *address /{s/ *address *//;{p;q}}}' config.boot)
echo "$fo_ip"
2,043
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...
10,369
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,375
Posted By rdrtx1
[[:digit:]]E[[:digit:]]
[[:digit:]]E[[:digit:]]
3,016
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
4,208
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 09:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy