Search Results

Search: Posts Made By: rdrtx1
4,981
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
26,748
Posted By rdrtx1
try adding: SET TERMOUT OFF
try adding:
SET TERMOUT OFF
10,354
Posted By rdrtx1
awk 'ORS=(NR % 3) ? RS : "\n"' RS=- File.txt >...
awk 'ORS=(NR % 3) ? RS : "\n"' RS=- File.txt > outfile.txt
17,762
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=" "
10,354
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...
17,762
Posted By rdrtx1
awk '/name/ {sub("[.].*", "", $1); sub("[.].*",...
awk '/name/ {sub("[.].*", "", $1); sub("[.].*", "", $NF); print $1, $NF}' nameserver.txt
10,354
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.
5,531
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" />"
5,266
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
8,020
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++)...
8,174
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...
10,955
Posted By rdrtx1
grep -zoP "(?s)Start.*12345.*End" file
grep -zoP "(?s)Start.*12345.*End" file
9,595
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
6,360
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}" ];...
6,668
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))...
4,393
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++...
7,007
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...
7,904
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.
7,007
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,904
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....
7,904
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.
21,536
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...
6,478
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] ==...
21,536
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;...
2,952
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 08:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy