Search Results

Search: Posts Made By: gio123bg
Forum: HP-UX 10-30-2006
25,877
Posted By gio123bg
ssh without password
Hi,
I have the necessity to run a korn shell on a remote server (both HP-UX servers) using the ssh command.

The sintax that I use is

ssh -l <remote user> <IP address of remote host>...
4,345
Posted By gio123bg
How to filter a null variable.
I have the necessity to use this command:

cat file1 | grep $A | grep $B

where sometime A and, or, B are not set.

For example:
I set A=@
never defined or set B

The above command...
4,429
Posted By gio123bg
Thanks!:) On my OS (Aix v. 5.1) the command...
Thanks!:)

On my OS (Aix v. 5.1) the command echo $VAR|awk '{print gsub("\.",0)}' returns always 1 if the VAR string contains or not a dot character.

echo $VAR|awk '{print gsub("\.",0)}' works...
4,429
Posted By gio123bg
Number of specific char in a string.
I wish to compute the number of dot chars in a string.
Example:
VAR="aaaa.bbbbb.cccc"

I try the shortest command to solve this test.

Thanks in advance for your help.
Regards,

...
5,479
Posted By gio123bg
Capture carriage return.
I try to test the carriage return in a variable.
$ LENGTH=`expr $VARIABLE : ".*"` will return the length of the variable. But this doesn't work if $VARIABLE has zero length.

Any help will be...
3,052
Posted By gio123bg
I tried also with print -n but in writing a...
I tried also with print -n but in writing a on-line tool in korn shell, I wish, pressing enter, to avoid to have the cursor at a new line, waiting a new value if I insert, for example, a loop on read...
3,052
Posted By gio123bg
Stop cursor reading a value.
Is it possible, in a Korn Shell script, to stop a cursor when I use the read command? More exactly, I try to have the cursor in a same line reading a value but not in a new line.
Maybe to display...
7,170
Posted By gio123bg
Thanks a lot oombera! My problem was the single...
Thanks a lot oombera!
My problem was the single quotes not used in my code!

Now I solved the problem in this way:

rsh $remoteHost 'ls -la $DirRemote >/dev/null 2>$1 ; echo $?'

and the...
7,170
Posted By gio123bg
Rsh: test $? on remote system.
Hi,
a little help.

I need to test the return code of a list file command on a remote system (Unix) using the rsh command. More exactly, to test is a directory exists, I try the following...
2,405
Posted By gio123bg
Thanks!! Now it is perfect! Giovanni
Thanks!! Now it is perfect!

Giovanni
4,327
Posted By gio123bg
Test return character.
Hi,
in my korn shell I have this code:

typeset -uL1 rc
read rc?"Insert Y=Yes (default) or N=No >>"

If I press enter without value I wish to set rc=Y. This is my default.

This test: if [[...
2,405
Posted By gio123bg
Help sorting file.
Hi,
I have this file (filex)
07-11-2003 10:11:12!cccc!ddd!eeeeeeee
07-11-2003 09:11:11!dddd!kkkkk!xxxxxx
09-12-2003 14:18:43!aaaa!bbbbb!cccc

where I need to sort it by date+time in this...
Forum: AIX 12-03-2003
8,096
Posted By gio123bg
Configure AIX v5.1 for send mail
Hi,
I wish to send a mail via ksh using this command:
cat mailfile | mail -s "My Project." gio123bg@hel.com

Is it necessary to configure some file? If yes, in which way? May you explain me...
4,607
Posted By gio123bg
Sendmail via KSH.
Hi to all!
I have the necessity to handle errors in my ksh script sending errors via e-mail.

Do you have any idea about this? More exactly I wish optimize this situation using an external...
12,430
Posted By gio123bg
Passing values out awk.
found that passing (input) values to awk, all work well. For example:
errpt | awk 'BEGIN { errore=0 }
substr($2,1,4) /'ParamData'/ {
....
} ' ParamData=`date +"%m%d"`

Now I wish to obtain...
Showing results 1 to 15 of 15

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