Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: bmk
14,193
Posted By bmk
Try like... awk -F "," '{ for (f = 1; f <=...
Try like...
awk -F "," '{
for (f = 1; f <= NF; f++)
a[NR, f] = $f
}
NF > nf { nf = NF }
END {
for (f = 1; f <= nf; f++)
for (r = 1; r <= NR; r++)
printf a[r, f] (r==NR ? RS : FS)
}' test.txt
11,570
Posted By bmk
you should give the space in the condition.. if...
you should give the space in the condition..
if [ $v_num -gt $comp_num ]
2,750
Posted By bmk
See my output... V12 V13 V14 V15 V16 100 200...
See my output...
V12 V13 V14 V15 V16
100 200 300 NA 500
220 NA 100 500 600
700 NA 900 100 200
6,021
Posted By bmk
we can do with elseif.. awk -F'|' '{if($2=="1")...
we can do with elseif..
awk -F'|' '{if($2=="1") {print $1"|"$5} else if($2=="2") { print $1"|"$5"|"$7}}' test.txt
1,241
Posted By bmk
We are not clear little bit. per my...
We are not clear little bit.
per my understanding..
awk '{print "zone "$0 "IN { type master; file /var/named/bad/malware.zone}"}' test.txt
2,040
Posted By bmk
Try like.. echo "12345" |sed...
Try like..
echo "12345" |sed 's/./&./g;s/.$//'
1,184
Posted By bmk
Please try the below. awk -F,...
Please try the below.

awk -F, '{$4="1,"$4}1' OFS=, test.txt
1,995
Posted By bmk
I think you are excepting this one.. while true...
I think you are excepting this one..
while true
do
[ -f /home/oracle/test.txt ] && break
sleep 2
done
ls -l /home/oracle/test.txt
1,010
Posted By bmk
Try like.. date -d yesterday +%Y%m%d
Try like..
date -d yesterday +%Y%m%d
905
Posted By bmk
Can you try like.. sed '0,/Status: -/s//Status:...
Can you try like..
sed '0,/Status: -/s//Status: PASSED/' test.txt
10,902
Posted By bmk
Simple you can try... select...
Simple you can try...
select dbms_xmlquery.getxml('select * from emp') from dual;
10,902
Posted By bmk
From where you are generating the csv file?
From where you are generating the csv file?
2,042
Posted By bmk
In unix.. try like... echo "theme1.htm" | tr...
In unix..
try like...
echo "theme1.htm" | tr -dc '[0-9]'
704
Posted By bmk
One more solutions... tr '\' '/' <test.txt
One more solutions...
tr '\' '/' <test.txt
1,180
Posted By bmk
You are excepting this one... tr -d '.' <...
You are excepting this one...

tr -d '.' < test.txt
1,273
Posted By bmk
Try like... awk '/abc : Process started/,/abc :...
Try like...
awk '/abc : Process started/,/abc : Process End/' test.txt
2,994
Posted By bmk
Try... ...
Try...
transmission_file_name_only="test_"$month$DD$YEAR"_partial.dat";
echo $transmission_file_name_only;
2,986
Posted By bmk
i am asking "What is your input data and output...
i am asking "What is your input data and output data"

---------- Post updated at 07:22 AM ---------- Previous update was at 07:00 AM ----------

you are excepting this one...
SELECT '<?xml...
1,195
Posted By bmk
Let me know ,what desired output you want?
Let me know ,what desired output you want?
901
Posted By bmk
Try like... awk -F '|' '{s+=$2} END {print...
Try like...

awk -F '|' '{s+=$2} END {print s}' test1.txt
1,798
Posted By bmk
Try like... paste -d '' - - < test1.txt
Try like...
paste -d '' - - < test1.txt
18,660
Posted By bmk
Try like.. awk -F'|' -v f=2 -v t=4 '{ for (i=f;...
Try like..
awk -F'|' -v f=2 -v t=4 '{ for (i=f; i<=t;i++) printf("%s%s", $i,(i==t) ? "\n" : OFS) }' test.txt
769
Posted By bmk
Try like... sed 's/^[0]*//' test.txt ...
Try like...

sed 's/^[0]*//' test.txt

---------- Post updated at 05:36 AM ---------- Previous update was at 05:33 AM ----------

Sorry for the confusion..
awk '{printf "%d\n",$0}' test.txt
Showing results 1 to 23 of 23

 

Featured Tech Videos

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