Search Results

Search: Posts Made By: honglus
1,577
Posted By honglus
I found this "if condition check" satisfy my...
I found this "if condition check" satisfy my need.

@(pattern-list)
Matches one of the given patterns
1,577
Posted By honglus
Thanks, but it is misunderstood, the input has...
Thanks, but it is misunderstood,
the input has to be EXACT match of one of options e.g.
centos-5.5-i386 windows-2003r2-x64 freebsd-6.1-i386
so, centos/freebsd/windows are not valid input
I am...
1,577
Posted By honglus
How to make sure the input string is one of many options?
How to make sure the input string is one of many options e.g centos-5.5-i386 windows-2003r2-x64 ?
The options are dynamic, so "case" condition check doesn't work.

I use grep -o -w , it doesn't...
3,530
Posted By honglus
I don't think you can add a new field in inode...
I don't think you can add a new field in inode structure, but you can use "debugfs" to view/change values of existing fields.
Forum: Linux 10-04-2011
3,182
Posted By honglus
#echo "username:newpasswd" | /usr/sbin/chpasswd ...
#echo "username:newpasswd" | /usr/sbin/chpasswd
# echo "newpassword" | passwd --stdin username


UNIX/LINUX TECH NOTES: Changing Linux user's password with script...
101,609
Posted By honglus
#(cat t1 ; cat t2 ) | xargs -n 2 12345 67890 ...
#(cat t1 ; cat t2 ) | xargs -n 2
12345 67890
24580 AAAAA
BBBBB CCCCC
1,785
Posted By honglus
$ echo -n a | od -i 0000000 97 ...
$ echo -n a | od -i
0000000 97
0000001
$echo -n b | od -i
0000000 98
0000001
20,741
Posted By honglus
It seems it is Solaris 10. In Solaris 10,...
It seems it is Solaris 10.

In Solaris 10, "svc:/system/sar" create cron job "/var/spool/cron/crontabs/sys" to record sar output to "/var/adm/sa"

The sar ouput history can be viewed by "-f".
...
9,279
Posted By honglus
ssh user1@${server1} /usr/bin/ls -l /tmp/file1 |...
ssh user1@${server1} /usr/bin/ls -l /tmp/file1 | awk '!/^$/ {print $5}' > ${DATAFILE}
1,941
Posted By honglus
I figured it out, But I don't like the trick of...
I figured it out, But I don't like the trick of tac.
[Help still needed, Solaris doesn't have tac command.]

$cat t2
test1
test2
[23] remove1
test3
[24] remove2
[1] remove

$tac t2 | awk...
1,941
Posted By honglus
Conditionally delete last X lines
delete last X lines,which start with [0-9]+

example file:
test1
test2
[23] remove1
[24] remove2

one liner shell is preferred.
7,657
Posted By honglus
No, You don't need loop. either one-liner can do...
No, You don't need loop. either one-liner can do the job.
7,657
Posted By honglus
find $1 -maxdepth 1 -type f -not -name "*.old"...
find $1 -maxdepth 1 -type f -not -name "*.old" -exec mv {} {}.old \;



find $1 -maxdepth 1 -type f -not -name "*.old" | xargs -i{} mv {} {}.old
2,430
Posted By honglus
You can get pid with pgrep command in Solaris. ...
You can get pid with pgrep command in Solaris.


pgrep -f AREmail


If there are multiple AREmail process, either command may get multiple PIDs , You has to use loop to kill each one.

...
Forum: Linux 11-17-2010
19,682
Posted By honglus
Maybe the service command can't found, try to use...
Maybe the service command can't found, try to use /sbin/service ..

If it works, you need to add PATH env variable in cron job.
12,662
Posted By honglus
I found two solutions for the issue. ...
I found two solutions for the issue.

Solution #1

#!/usr/bin/perl -w
use CGI qw(:standard);
$|=1;
my $r = shift;
print header('text/html');
print start_html;
$r->print ("Processing ......
12,662
Posted By honglus
$| doesn't work, To make it simple, I tested...
$| doesn't work, To make it simple, I tested following script. I expect "OK, starting time consuming process " appeared first, then "All done" aftter 5 seconds. But they all appeared all together...
12,662
Posted By honglus
Perl CGI. no output until backend script is done
It is a basic Perl CGI question, I want to print out "Processing ... " while backend script /script/wait.pl is still running.

But acctually, nothing appeared in browser untill /script/wait.pl...
24,977
Posted By honglus
DNS server choice: Windows DNS vs Linux BIND
I'd like to get some opnions on choosing DNS server:
Windows DNS vs Linux BIND comparrsion:

1) managment, easy of use
2) Security
3) features
4) peformance
5) ??

I personally prefer...
5,600
Posted By honglus
construct a string with X number of spaces
I'd like to create a variable with the value of X number of space( no Perl please), printf seems to work, but , in following example,10 spaces becomes 1 space when assinged to a variable, Why? other...
3,453
Posted By honglus
Alister, Can you explain how "n;" means...
Alister,

Can you explain how "n;" means every 2nd line? I undertand the obvious expression.


sed '2~1 s/......//'
10,415
Posted By honglus
yes, TCP 53 is needed for zone transfer "slave...
yes, TCP 53 is needed for zone transfer "slave type", but I couldn't find any info about protocol used for r" forward type"

---------- Post updated at 02:50 PM ---------- Previous update was at...
10,415
Posted By honglus
bind 9 forwarders: use UDP or TCP?
I use forwarders for a subzone, but TCP 53 is blocked, So does forwarders really need TCP?
If forwaders use UDP, I can't get following scenario to work:
main zone is master, but subzone is forwad....
2,599
Posted By honglus
awk -F";" '{ print $1 ;}' test.csv| xargs -I{}...
awk -F";" '{ print $1 ;}' test.csv| xargs -I{} date -d {} +%s
14,664
Posted By honglus
> od -cb test1.txt 0000000 a \n b ...
> od -cb test1.txt
0000000 a \n b
141 012 142
0000003


BTW: I wan't to loop through each line to do something with "while read", It just missed the last line.
Showing results 1 to 25 of 87

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