Search Results

Search: Posts Made By: haczyk
1,629
Posted By haczyk
try this: sed '/ftp/ s/$/,username/'...
try this:
sed '/ftp/ s/$/,username/' outputfileif everything is working you can run:
sed -i '/ftp/ s/$/,username/' outputfilep.s. I assumed you do not have groups ftp and ftp1, ftp2 ..etc
2,218
Posted By haczyk
maybe you can replace ftp by sftp ? disable...
maybe you can replace ftp by sftp ?

disable firewall ?:confused: the real problem with FTP is that service sends all data in clear text. If you allow only FTP service ...imho it is a poor...
9,278
Posted By haczyk
egrep -i -v "^#|^$" file ?
egrep -i -v "^#|^$" file
?
947
Posted By haczyk
Your code looks like part of nagios plugin .... ...
Your code looks like part of nagios plugin ....

If so:

-H $HOSTADDRESS$ -v 1 -C $ARG1$ -c $ARG2$ -w $ARG3$ -C = command
-c = critical threshold
-w = warning threshold

$ARG1$ = argument...
1,535
Posted By haczyk
awk -F "," '{print $1 "," $2}' filep.s 1. I...
awk -F "," '{print $1 "," $2}' filep.s 1. I assumed that comma is a separator.
p.s 2. Between records there is an empty lines ?

Edit. I didnt notice that comma is present inside field. Maybe...
1,171
Posted By haczyk
@Scrutinizer you are AMAZING. Your script is...
@Scrutinizer you are AMAZING. Your script is working perfectly !

Many thanks for support

Best regards,
1,171
Posted By haczyk
Hello, awk -F , ' $2 != l && NR > 1 {...
Hello,

awk -F , '
$2 != l && NR > 1 {
if ( sum )
printf( "%s; %.3f\n", l, (f/sum) * 100 );
f = sum = $1;
l = $2;
next;
}
{
sum...
1,171
Posted By haczyk
Hello agama, In every line first column has...
Hello agama,

In every line first column has value greater than 0 or it won't appear.

And here is an issue related with above:
2012/01;0this should be
2012/01;100since there are no values...
1,171
Posted By haczyk
Shell script - precent value
Hello,

I have example data like below:
39 ,2012/01,0
22 ,2012/02,0
2 ,2012/02,1
23 ,2012/03,0
3 ,2012/03,1
16 ,2012/04,0
2 ,2012/04,1
8...
48,207
Posted By haczyk
First run: to count how many lines was...
First run:

to count how many lines was returned by find.

next run this:
find /lz/BI/ -mtime +31 -name 'Datapull*.csv.COMPLETE' -exec rm -f '{}' \;
48,207
Posted By haczyk
you missed a path for "find" (in elixir_sinari's...
you missed a path for "find" (in elixir_sinari's post variable "<directory_path>")
2,129
Posted By haczyk
# tac /path/to/file | grep -m 1 "alpha.*beta" -B...
# tac /path/to/file | grep -m 1 "alpha.*beta" -B 15 | tac
I assumed that you are looking for "alpha...beta", not "beta ..alpha"
Forum: HP-UX 04-24-2012
9,571
Posted By haczyk
I think on hpu-ux there is ipfilter: source...
I think on hpu-ux there is ipfilter:
source (https://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=B9901AA)

Currently I dont have access to hpux, but here...
2,386
Posted By haczyk
@Corona688: your solutions works perfectly for me...
@Corona688: your solutions works perfectly for me (with small modifications). Many thanks for help
@agama: Thank you for your code.

It's a pleasure to learn from you guys. Thanks ! :)

Kind...
2,386
Posted By haczyk
Thank you for quick reply. Config file is...
Thank you for quick reply.

Config file is flexible - I am creating it in php.

Could you please tell me how (in your version of config file) I can recognize which fields belong to tab1 and which...
2,386
Posted By haczyk
Awk - query about arrays
Hello again,

I have example config file with two arrays:

tab1[0]="name1 surname1"
tab1[1]="name2 surname2"
tab1[2]="name3 surname3"

tab2[0]="First"
tab2[1]="Second"and csv file:...
6,627
Posted By haczyk
LOL ...its working....it is ultra-fast ! :) ...
LOL ...its working....it is ultra-fast ! :)

Many thanks for help jlliagre ! :) ( now I have to slowly read and understand your code ;p )

Best regards,
Paweł
6,627
Posted By haczyk
1. yes, colon might appear in field 4 ( generally...
1. yes, colon might appear in field 4 ( generally this field contain input from user, so here can be everything.... thats why I have weird separator in awk)
2. field 9 always contains "00:00:00"....
6,627
Posted By haczyk
1. this might be sample input file: ...
1. this might be sample input file:

"aaaaa","bbbbbb","ccccc","ddddd,eeeee","ffffff","ggggg","3","2012/02/22 12:25:21","2012/02/22 00:00:00","8","hhhh","iiii"...
9,993
Posted By haczyk
I guess that you are not able to start on...
I guess that you are not able to start on destination server service like ssh (scp) for ftp?

If no I think you have to use external package like "axel" (source...
6,627
Posted By haczyk
my script: # grep -v ^# letsgo.sh ...
my script:
# grep -v ^# letsgo.sh
DateStart="2012/01/01"
DateEnd="2012/04/15"
start=`date +%s -d "$DateStart"`
end=`date +%s -d "$DateEnd"`
gawk -F '^"|","|"$' -v start=$start '{cmd="date +%s...
6,627
Posted By haczyk
Thank you for help again :) generally it...
Thank you for help again :)

generally it works...however performance is very poor:
real 6m34.824s
and it is in the middle on job ;/

Is there any way to speed-up this?
3,629
Posted By haczyk
# awk ' $1 ~ /^[0-9]/' file 1 32.3kB ...
# awk ' $1 ~ /^[0-9]/' file
1 32.3kB 65.5GB 65.5GB primary ext3 boot
2 65.5GB 67.7GB 2147MB primary linux-swap
3 67.7GB 500GB 432GB primary ext3
## cat...
6,627
Posted By haczyk
Heh ...its works. Why I didnt check earlier this...
Heh ...its works. Why I didnt check earlier this package ? ;/

Many thanks for help ! :)

Best regards,
Paweł

Edit:

In your solution there is "getline" command. In my case I am using this...
6,627
Posted By haczyk
# cat /etc/debian_version 6.0.4 I used...
# cat /etc/debian_version
6.0.4

I used this example line which I've pasted before:
# cat lol.tmp
"aaaaa","bbbbbb","ccccc","ddddd,eeeee","ffffff","ggggg","3","2012/02/22 12:25:21","2012/02/22...
Showing results 1 to 25 of 37

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