Search Results

Search: Posts Made By: protocomm
2,004
Posted By protocomm
Ok, i correct... awk...
Ok, i correct...

awk '$8=="TYPE=snp"{a++};$8=="TYPE=ins"{b++};$8=="TYPE=del"{c++}END{print "snp="a "\n" "ins="b "\n" "del="c}'
2,282
Posted By protocomm
it's do your job ? echo '...
it's do your job ?

echo ' :20:9400115251184711 :61:1509090908DR991,43NCOL09:04:0032 :86:/OCMT/EUR991,43/PT/FT/BN/ORANGE ESPAGNE S.A.U' | sed 's/[[:space:]]:[0-9][0-9]:/\'$'\n&/g'
1,466
Posted By protocomm
try this: if [ "$(ls file | awk -F_...
try this:

if [ "$(ls file | awk -F_ '$5~/[0-9]{8}/')" != "" ];then echo GoodFile;fi
2,144
Posted By protocomm
first...
first field/secondhome/thirthintannf/fourthfoto3/and fifth2015_0313_090651_219.JPG,

-F"[/,]" has 2 field separator

If i have the field separator / the fifth print 2015_0313_090651_219.JPG,and...
2,144
Posted By protocomm
awk -F "[/,]" 'NR>1 {print $5}' file -F...
awk -F "[/,]" 'NR>1 {print $5}' file

-F "[/,]"
Set Field Input Separator to /,

NR>1 skip the first line

{print $5} print the fifth field
2,144
Posted By protocomm
awk -F "[/,]" 'NR>1 {print $5}' file
awk -F "[/,]" 'NR>1 {print $5}' file
2,230
Posted By protocomm
Hello, i have found an another solution: ...
Hello, i have found an another solution:

hexdump -C file | awk -F"|" '{print $2}' | sed 's/\.//g' | tr -d '\n'

It is faster than the loop
927
Posted By protocomm
try: awk -F"="...
try:

awk -F"=" '/failed/{sum1+=$2};/error/{sum2+=$2}END{print "failed="sum1"\n""error="sum2}' file
1,327
Posted By protocomm
thx for your explanation, but i don't understand...
thx for your explanation, but i don't understand how the output print the line between the line which begin by 2
1,327
Posted By protocomm
Can you explain your code, please ? i don't...
Can you explain your code, please ? i don't understand why detect the line which begin with the number 2 (/^2/) and why x ?
1,668
Posted By protocomm
hi, you can use this for wait while the file...
hi,

you can use this for wait while the file exist,
while ! [ -e pathOfYourFile ];do sleep 1;done
2,201
Posted By protocomm
with keep the logic of snr_silencer, you forget...
with keep the logic of snr_silencer, you forget the double quote around command echo

"$(echo $nfname.gz | tr 'dat' 'txt')"
864
Posted By protocomm
if [[ "$(echo $runbatch | grep FCST)" != "" ]];...
if [[ "$(echo $runbatch | grep FCST)" != "" ]]; then echo "find";fi
1,250
Posted By protocomm
at the end of command you add command awk...
at the end of command you add

command awk file > fileToSave
1,250
Posted By protocomm
awk -F"[:,]" '{if ($1~/@2 line/){print $1":...
awk -F"[:,]" '{if ($1~/@2 line/){print $1": <XO>"$2"<XC,\""$2"\",\"\",\"\",\"\",0,0,\"\">,<XO>"$3"\",\"\",\"\",\"\",0,0,\"\">"}else{print $0}}' file
1,349
Posted By protocomm
try awk 'NR==FNR{a[$0]++;next}{if ($0 in...
try

awk 'NR==FNR{a[$0]++;next}{if ($0 in a){print $0,a[$0]} else {print $0,0}}' file B file A
1,805
Posted By protocomm
My code works on my mac, i use bash. sorry.
My code works on my mac, i use bash.

sorry.
1,805
Posted By protocomm
sed -n...
sed -n 's|\([0-9]*\.[0-9]*\.[A-Z0-9]*\)\(\.[0-9]*\.[0-9]*\)\(.*\)|\1\3|p'
2,424
Posted By protocomm
If i understand, the AND && is an logical and...
If i understand, the AND && is an logical and then 1 && 1=1 (1 && 0=0)
3,178
Posted By protocomm
You add .command as suffix.it worked on mac osX ...
You add .command as suffix.it worked on mac osX

your script.command
4,113
Posted By protocomm
Yes it is a command line awk to find occurrence,...
Yes it is a command line awk to find occurrence, the difference with script of clx is if there are several "am" in a line, i count it.
707
Posted By protocomm
you can compare the paths of files, example: if...
you can compare the paths of files, example:
if [ pathOfFile1 = pathOfFile2 ];then yourTreatment;fi
2,460
Posted By protocomm
for the first result, but perhaps better: ...
for the first result, but perhaps better:

cat file | awk 'NR>3' | awk '{print $2, $4, $5, $7, $8}' | tr ',' ' '
4,507
Posted By protocomm
var1=$(awk -F "[<>]" '{print $2}'...
var1=$(awk -F "[<>]" '{print $2}' file);var2=$(awk -F "[<>]" '{print $4}' file);var3=$(awk -F "[<>]" '{print $6}' file)
3,781
Posted By protocomm
thanks,it's clear now...
thanks,it's clear now...
Showing results 1 to 25 of 26

 

Featured Tech Videos

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