Search Results

Search: Posts Made By: honglus
1,108
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,108
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,108
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...
2,451
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
2,466
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...
57,194
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,287
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
17,766
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".
...
4,954
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,382
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,382
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.
4,740
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.
4,740
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
1,846
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
13,928
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.
10,999
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 ......
10,999
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...
10,999
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...
16,842
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...
1,767
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...
2,855
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/......//'
6,742
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...
6,742
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,038
Posted By honglus
awk -F";" '{ print $1 ;}' test.csv| xargs -I{}...
awk -F";" '{ print $1 ;}' test.csv| xargs -I{} date -d {} +%s
11,855
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

 

Featured Tech Videos

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