Search Results

Search: Posts Made By: ZealeS
97,446
Posted By ZealeS
try in linux /sbin/service crond start or ...
try in linux
/sbin/service crond start
or
/sbin/service crond restart

i am not sure how to restart the cron process in Unix.
man cron can get more details...

maybe you can check the file...
8,383
Posted By ZealeS
[zec#/usr1/zec]: str="hello" [zec#/usr1/zec]:...
[zec#/usr1/zec]: str="hello"
[zec#/usr1/zec]: perl -e "print \"$str\n\""
hello
[zec#/usr1/zec]:


Cheers
19,564
Posted By ZealeS
grep -E "aa|bb|cc" filename grep -e "aa" -e...
grep -E "aa|bb|cc" filename
grep -e "aa" -e "bb" -e "cc" filename
or
egrep -E "aa|bb|cc" filename
5,589
Posted By ZealeS
Remember set your running env before isql cmd. ...
Remember set your running env before isql cmd.

crontab run in special env.
use full path of your isql cmd maybe better.
9,990
Posted By ZealeS
just replace ' to " is okay. var=blah ...
just replace ' to " is okay.

var=blah
var2=AAA
perl -pi -e "s#$var#$var2#ig" replacetext


cheers.
5,187
Posted By ZealeS
awk : awk '{print $2" "$4 > "fb_"$1}'...
awk :

awk '{print $2" "$4 > "fb_"$1}' filename
77,424
Posted By ZealeS
just like this is okay. sqlplus...
just like this is okay.


sqlplus userid/passwd <<EOF >filename.log
your sql.
...

set serveroutput on;
dbms_output.put_line(para1||' '||para2||...);


EOF

all output log write into...
4,466
Posted By ZealeS
Replace your working shell to bash or ksh. bash...
Replace your working shell to bash or ksh.
bash or ksh is more powerful.

in sh aa=`echo $a`
in bash or ksh you can use aa=$(echo $a) also.
bash support some operations in {}
e.g:
${file#*/}...
14,787
Posted By ZealeS
In shell, you can use diff instead. diff is...
In shell, you can use diff instead.

diff is so powerful.

relative cmd like : paste, comm, join ....
2,516
Posted By ZealeS
awk '{for(i=1;i<=NF;i++) print int($i)}' ...
awk '{for(i=1;i<=NF;i++) print int($i)}'

then strings will be convert into zero.
11,011
Posted By ZealeS
add user in the .rhosts file.
add user in the .rhosts file.
16,079
Posted By ZealeS
man cal or man date
man cal
or
man date
5,822
Posted By ZealeS
awk can translate string to float automatic. ...
awk can translate string to float automatic.

try:
awk '($10 > 10)'
4,917
Posted By ZealeS
man tar man gzip e.g: tar -cf...
man tar
man gzip

e.g:
tar -cf filename.tar -I filename.list
gzip filename.tar
4,593
Posted By ZealeS
;) ;) \<hai\> means total matching. ...
;) ;)
\<hai\> means total matching.
^\<hai\> means special position, the "hai" maybe begin of the line.

try following, you'll see....
$ echo "1234" | sed 's/\(12\)\(34\)/\1 \2/g'
$ 12 34
$...
9,097
Posted By ZealeS
sort and then comm
sort
and then
comm
4,593
Posted By ZealeS
sed
bash-2.05$ echo 'hai hail $hai thai hai'
hai hail $hai thai hai
echo 'hai hail $hai thai hai' | sed 's/\([^\$]\)hai/\1power hai/g;s/^hai/power hai/'
power hai power hail $hai tpower hai power hai...
28,997
Posted By ZealeS
awk '{print NR}' can get the line no. that...
awk '{print NR}' can get the line no.
that maybe you want.
e.g:

bash-2.05$ awk '{if(NR==1)od="st";else if(NR==2)od="nd";else if(NR==3)od="rd";else od="th";print NR""od" line of file a";}' a.txt...
3,430
Posted By ZealeS
bash: ls *.sh > /dev/null 2>&1 && ls *.sh | wc...
bash:
ls *.sh > /dev/null 2>&1 && ls *.sh | wc -l || echo "Sorry"
13,365
Posted By ZealeS
bash: (egrep "ES|NS" filename) && { echo "ok";...
bash:
(egrep "ES|NS" filename) && { echo "ok"; } || { echo "sorry"; }
1,676
Posted By ZealeS
bash: file=/dir1/dir2/dir3/my.file.txt ...
bash:
file=/dir1/dir2/dir3/my.file.txt
${file#*/} #dir1/dir2/dir3/my.file.txt
${file##*/} #my.file.txt
${file#*.} #file.txt
${file##*.} #txt
${file%/*} ...
Forum: Programming 03-09-2005
2,081
Posted By ZealeS
print words of 5-char-length cat filename |...
print words of 5-char-length

cat filename | tr -cs '[A-z]' '[\n*]' | awk '(length($0)==5)'
or
cat filename | tr -cs '[:lower:][:upper:]' '[\n*]' | awk '(length($0)==5)'
3,990
Posted By ZealeS
ls *.* | (made to cmd) | sh or find ./ *.* |...
ls *.* | (made to cmd) | sh
or
find ./ *.* | xargs -i mv {} {}.bak
97,446
Posted By ZealeS
crontab -l > mycrontab vi mycrontab crontab...
crontab -l > mycrontab
vi mycrontab
crontab mycrontab
13,756
Posted By ZealeS
maybe you want like this: objIp=127.0.0.1 ...
maybe you want like this:

objIp=127.0.0.1
/usr/sbin/ping $objIp 5 >/dev/null && echo "$objIp is alive" || { echo "$objIp isn't exists"; exit 0; }
Showing results 1 to 25 of 28

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