Search Results

Search: Posts Made By: rdrtx1
3,204
Posted By rdrtx1
awk 'ORS=(NR % 3) ? RS : "\n"' RS=- File.txt >...
awk 'ORS=(NR % 3) ? RS : "\n"' RS=- File.txt > outfile.txt
5,283
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=" "
1,921
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++...
3,194
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...
3,194
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?
7,720
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...
3,263
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] ==...
7,720
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;...
1,008
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...
2,580
Posted By rdrtx1
awk -F, 'v[$1,$2] &&...
awk -F, 'v[$1,$2] && ($8-v[$1,$2])>1;{v[$1,$2]=$8;}' file
2,839
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=",...
2,839
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=/...
3,467
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) *...
3,506
Posted By rdrtx1
try: if [ "$line" != "\n" ] in case $line is an...
try: if [ "$line" != "\n" ] in case $line is an empty string.
1,458
Posted By rdrtx1
give space. otherwise it will think it's another...
give space. otherwise it will think it's another variable.
1,951
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
3,089
Posted By rdrtx1
See updated post to fix quotes.
See updated post to fix quotes.
3,089
Posted By rdrtx1
sed -i 's/$$EDWS_DATE_INSERT...
sed -i 's/$$EDWS_DATE_INSERT *=.*/$$EDWS_DATE_INSERT='"$(date "+%y%m%d")"'/' abc.txt
3,266
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?
4,355
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,611
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...
4,365
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
2,641
Posted By rdrtx1
[[:digit:]]E[[:digit:]]
[[:digit:]]E[[:digit:]]
2,278
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
2,588
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

 

Featured Tech Videos

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