Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: rdrtx1
787
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
4,838
Posted By rdrtx1
try adding: SET TERMOUT OFF
try adding:
SET TERMOUT OFF
2,414
Posted By rdrtx1
awk 'ORS=(NR % 3) ? RS : "\n"' RS=- File.txt >...
awk 'ORS=(NR % 3) ? RS : "\n"' RS=- File.txt > outfile.txt
1,522
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,414
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...
1,522
Posted By rdrtx1
awk '/name/ {sub("[.].*", "", $1); sub("[.].*",...
awk '/name/ {sub("[.].*", "", $1); sub("[.].*", "", $NF); print $1, $NF}' nameserver.txt
2,414
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.
1,606
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" />"
1,433
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
2,717
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++)...
2,530
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...
1,778
Posted By rdrtx1
grep -zoP "(?s)Start.*12345.*End" file
grep -zoP "(?s)Start.*12345.*End" file
2,155
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
2,083
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}" ];...
1,922
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))...
1,513
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++...
2,357
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...
2,150
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.
2,357
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?
2,150
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....
2,150
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.
6,099
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...
2,442
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] ==...
6,099
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;...
775
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

 

Featured Tech Videos

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