Search Results

Search: Posts Made By: tikual
2,361
Posted By tikual
What is your list look like?
What is your list look like?
3,943
Posted By tikual
vcardo10, Do the format of 1st to 9th of...
vcardo10,

Do the format of 1st to 9th of month and Jan to Sep become one digit? Otherwise Google's script may need a improvement.
6,490
Posted By tikual
most fastest way > filename
most fastest way

> filename
10
2,624
Posted By tikual
Hi jayakhanna, Do you know the first...
Hi jayakhanna,

Do you know the first variable 'answer' not equal to the second 'answer' in 'case'? Try to think your script problem,

echo " a.read a file"
.
.
while [ true ]
do
echo...
10
2,624
Posted By tikual
What is the meaning of in line 5 "; do ?? ...
What is the meaning of in line 5
"; do ??

You may use 'select' to do the same thing more convenience.

PS3="Enter your choice > "
select answer in "read a file" "create a file" "add on...
10
2,624
Posted By tikual
How to guess your whole script? Pls. post...
How to guess your whole script?

Pls. post your script to here.
2,852
Posted By tikual
I tried my posted before and found a error. It...
I tried my posted before and found a error. It is no output to log from the grep although it can't get any pattern. So the solution is:

You can do it more simply

#!/bin/sh

for a in `cat...
2,852
Posted By tikual
About the [[ or [, because I always write korn...
About the [[ or [, because I always write korn shell rather than bourne shell. ;)

Yes, -s is one of option of 'if'. You can type man if or man sh to know more.

I think the error.log may...
2,852
Posted By tikual
oh, then you should take the email part out of...
oh, then you should take the email part out of the loop.

#!/bin/sh

for a in `cat ipaddresses`
do
#write error to log for checking
/usr/sbin/ping $a|grep -ic alive 2> error.log
done

#the...
2,852
Posted By tikual
No tested, try it. #!/bin/sh for a in...
No tested, try it.

#!/bin/sh

for a in `cat ipaddresses`
do
if /usr/sbin/ping $a|grep -ic alive
then
/usr/sbin/ping $a|grep -ic alive
else
mail jshwood <<!!!
message
!!!
fi
done
9,306
Posted By tikual
ksh -x yourscript
ksh -x yourscript
6,016
Posted By tikual
If you want to match the field only that contains...
If you want to match the field only that contains digits only, then:

sed 's/^0[0-9]\{5\} /****** /' file1 > file2

It matchs the field starting with 0 and 5 digits follow it. I added one more...
4,656
Posted By tikual
Try to use command 'file' to view the description...
Try to use command 'file' to view the description of the file.

file test.Z
test.Z: compressed data block compressed 16 bits

file test1.gz
test1.gz: gzip compressed data - deflate...
4,278
Posted By tikual
try to use lp command with -o nobanner.
try to use lp command with -o nobanner.
12,455
Posted By tikual
Ygor really a expert in awk!! I viewed his posts...
Ygor really a expert in awk!! I viewed his posts and I still need to learn from him/her.

I know that is one of method to set variable in awk.

And I know 3 methods to do that, maybe more than 3...
4,332
Posted By tikual
the following will assign Y to variable rc if it...
the following will assign Y to variable rc if it is null.

${rc:=Y}
2,419
Posted By tikual
add a option -r in your sort command
add a option -r in your sort command
11,080
Posted By tikual
you can type command 'set' to view all command...
you can type command 'set' to view all command prompts.

PS1 to PS4

PS1 is default shell prompt

PS2 is secondary prompt string. If you type command like ls -l "file* and then press enter. ...
22,616
Posted By tikual
To limit the history file in last 100 commands. ...
To limit the history file in last 100 commands. Put the follows in your profile.
export HISTSIZE=100
2
awk
1,752
Posted By tikual
e.g let say if you want to print your logname...
e.g
let say if you want to print your logname after the result. Use -v for the variable.
ls -l | awk -v abc=$LOGNAME '{print $9,abc}'

abc mylogname
abc1 mylogname
testfile mylogname
3,650
Posted By tikual
how about you type as follows: open...
how about you type as follows:

open "Desktop/Pictures/Joe Average.jpg"
7,319
Posted By tikual
Don't know has GUI interface or not. But it is...
Don't know has GUI interface or not. But it is not difficult to work by command line.

you have a file according to your requirement:

#my english is not good. Just think that every 4 sunday is...
2,955
Posted By tikual
sorry, a typo found s/\(^.*\~\) *$/\1 / ...
sorry, a typo found

s/\(^.*\~\) *$/\1 / <--- one space behind \1
2,955
Posted By tikual
ok, got your meaning now. try it ...
ok, got your meaning now.

try it
s/\(^.*\~\) *$/\1/
2,955
Posted By tikual
I think that you are trying to edit the file in...
I think that you are trying to edit the file in vi, right? Actually I don't know what result you want.

if you want the following result.
9DH21AQAE~
then
:s/\~[^~]*.*$/\~/

9DH21AQAE~56081~...
Showing results 1 to 25 of 51

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