Search Results

Search: Posts Made By: protocomm
2,536
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,869
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,757
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
3,175
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...
3,175
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
3,175
Posted By protocomm
awk -F "[/,]" 'NR>1 {print $5}' file
awk -F "[/,]" 'NR>1 {print $5}' file
2,833
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
1,186
Posted By protocomm
try: awk -F"="...
try:

awk -F"=" '/failed/{sum1+=$2};/error/{sum2+=$2}END{print "failed="sum1"\n""error="sum2}' file
1,678
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,678
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 ?
2,154
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,977
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')"
1,028
Posted By protocomm
if [[ "$(echo $runbatch | grep FCST)" != "" ]];...
if [[ "$(echo $runbatch | grep FCST)" != "" ]]; then echo "find";fi
1,437
Posted By protocomm
at the end of command you add command awk...
at the end of command you add

command awk file > fileToSave
1,437
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
2,507
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
2,416
Posted By protocomm
My code works on my mac, i use bash. sorry.
My code works on my mac, i use bash.

sorry.
2,416
Posted By protocomm
sed -n...
sed -n 's|\([0-9]*\.[0-9]*\.[A-Z0-9]*\)\(\.[0-9]*\.[0-9]*\)\(.*\)|\1\3|p'
3,252
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)
4,827
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
7,299
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.
901
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,712
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 ',' ' '
5,130
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)
4,123
Posted By protocomm
thanks,it's clear now...
thanks,it's clear now...
Showing results 1 to 25 of 26

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