Search Results

Search: Posts Made By: rdrtx1
2,609
Posted By rdrtx1
join -t"|" -j 1 -a 1 -a 2 a.txt c.txt
join -t"|" -j 1 -a 1 -a 2 a.txt c.txt
13,048
Posted By rdrtx1
try adding: SET TERMOUT OFF
try adding:
SET TERMOUT OFF
4,446
Posted By rdrtx1
awk 'ORS=(NR % 3) ? RS : "\n"' RS=- File.txt >...
awk 'ORS=(NR % 3) ? RS : "\n"' RS=- File.txt > outfile.txt
12,969
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=" "
4,446
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...
12,969
Posted By rdrtx1
awk '/name/ {sub("[.].*", "", $1); sub("[.].*",...
awk '/name/ {sub("[.].*", "", $1); sub("[.].*", "", $NF); print $1, $NF}' nameserver.txt
4,446
Posted By rdrtx1
Please show attempts to complete this task....
Please show attempts to complete this task. Otherwise a moderator might have you do it manually with a text editor. Also, search the site for similar or exact solutions to accomplish this task.
2,678
Posted By rdrtx1
try adding names to each button: echo "<input...
try adding names to each button:
echo "<input type="submit" name="server$RANDOM" value="$SERV_LINUX" />"
2,617
Posted By rdrtx1
#!/bin/bash echo "Let's Get This Started!" ...
#!/bin/bash

echo "Let's Get This Started!"

for n in {1..45}
do
echo $n. /$n
if [ $n -lt 45 ]
then
linkrot -c -v -o $n.txt $n.pdf
else
echo All Done
fi
done
4,584
Posted By rdrtx1
awk -F '\t' ' NR==1 { for (i=2; i<=NF; i++)...
awk -F '\t' '
NR==1 {
for (i=2; i<=NF; i++) {c[i]=$i; cs[$i]=$i;}
printf $1 FS;
for (i in cs) printf i FS;
print "";
next;
}
{
for (i in cst) delete cst[i];
for (i=2; i<=NF; i++)...
4,405
Posted By rdrtx1
awk ' BEGIN{srand();} { fstr=":"; for...
awk '
BEGIN{srand();}
{
fstr=":";
for (fld in fields) delete fields[fld];
while (gsub(":", ":", fstr) <= (NF*(pct/100.0))) {
rnd=rand();
sub("^[^.]*[.]", "", rnd);
fld=((rnd+1) % NF) + 1;
if...
4,823
Posted By rdrtx1
grep -zoP "(?s)Start.*12345.*End" file
grep -zoP "(?s)Start.*12345.*End" file
4,284
Posted By rdrtx1
an ex.: ls -1 | grep ".*_.*_.*.bum" | while...
an ex.:
ls -1 | grep ".*_.*_.*.bum" | while IFS=_ read a b c ; do mv ${a}_${b}_${c} ${a}_${c} ; done
3,468
Posted By rdrtx1
- try changing to this block of code: if [ -z...
- try changing to this block of code:
if [ -z "${arg_Smirs+X}" ]; then
flnm="${txPath}/${flnm01a}"
elif [ -z "${arg_Capav+X}" ]; then
flnm="${txPath}/${flnm02a}"
elif [ -z "${arg_Igmfn+X}" ];...
3,583
Posted By rdrtx1
- an area solution ex.: awk ' function...
- an area solution ex.:
awk '
function triangle_area(x1, y1, x2, y2, x3, y3) {
#
# determine area of triangle with the 3 points given
#
area=((x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2))...
2,437
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,851
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,749
Posted By rdrtx1
I tried both previously but the bash shell still...
I tried both previously but the bash shell still converts the number. If the leading zero is removed then it is treated as integer. Again, only the version of bash I use is doing it.
3,851
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?
3,749
Posted By rdrtx1
true that. but I wanted to keep two digits echo...
true that. but I wanted to keep two digits echo for each column. In case of a number like: 140

note: my bash version thinks that the number 01140 is not a integer type because of the leading zero....
3,749
Posted By rdrtx1
number=01140 numbers=$(printf "%6s" $number) ...
number=01140
numbers=$(printf "%6s" $number)
numbers=${numbers// /0}
echo ${numbers:0:2} hours, ${numbers:2:2} minutes, ${numbers:4:2} seconds

caveat for more than 99 hours.
11,106
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,889
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] ==...
11,106
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,368
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...
Showing results 1 to 25 of 500

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