Search Results

Search: Posts Made By: protocomm
78,310
Posted By protocomm
For the tabs, the command line as follow works...
For the tabs, the command line as follow works fine...

cat file (with tabs) | tr -d '\t'
4,251
Posted By protocomm
thanks,it's clear now...
thanks,it's clear now...
2,779
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}'
3,060
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,870
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,391
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,391
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,391
Posted By protocomm
awk -F "[/,]" 'NR>1 {print $5}' file
awk -F "[/,]" 'NR>1 {print $5}' file
2,903
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,477
Posted By protocomm
try: awk -F"="...
try:

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

command awk file > fileToSave
1,478
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,597
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
3,045
Posted By protocomm
My code works on my mac, i use bash. sorry.
My code works on my mac, i use bash.

sorry.
3,045
Posted By protocomm
sed -n...
sed -n 's|\([0-9]*\.[0-9]*\.[A-Z0-9]*\)\(\.[0-9]*\.[0-9]*\)\(.*\)|\1\3|p'
3,376
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)
5,030
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
8,680
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.
939
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,741
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 ',' ' '
Showing results 1 to 25 of 26

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