i have a short script that takes a filename and secure copies the file to a remote machine. i'd like to be able to take a * character and secure copy all the files in the directory.
first of all, how would i compare $1 to see if it's a * character?
if or didn't do it.
second question is... (3 Replies)
hi folks,
I am trying to write a script for deleting all the files which are older than "N" days from current directory.
CODE:
FileName="*.*"
NumDays=-1
echo $FileName
echo $NumDays
find * -prune -name $FileName -mtime $NumDays -exec rm {} \;
Now the problem here is when i... (3 Replies)
Hi All,
I am using crontab which execute a shell script.
In the shell script, I am executing a java program. This Java program requires the jar files.
The cron job file ' cronfile.txt ' contents:
MAILTO="raju_utla@dcis.uohyd.ernet.in"
0-59 * * * *... (0 Replies)
Hi All,
I am using crontab which execute a shell script.
In the shell script, I am executing a java program. This Java program requires the jar files.
The cron job file ' cronfile.txt ' contents:
MAILTO="raju_utla@dcis.uohyd.ernet.in"
0-59 * * * *... (3 Replies)
Hi,
i want to write a script that executes a program (exec?) .
this program then requires a filename as input.
how do i give it this input in the script so the program will be complete run and close by the script.
e.g.
exec prog.exe
program then asks for filename
"enter filename:"... (1 Reply)
Hello all.
I am trying to compile Apache 2 (again!) and the configure script keeps telling me it does not recognize the options. Everything I am including is in the --help list.
For example: --enable-so. First I will put in the LD flags, then configure with the --enable-so option.
... (2 Replies)
I will be passing an argument to a csh script
The script can be either of two forms
For example, either
script.csh zloc=5/10
or
script.csh zloc=5/10/20
So there can be either two values or three values. How can I distinguish which one the user has inputted?
I have made... (1 Reply)
Hello,
I re-installed my laptop and installed a new copy of VMBOX, I created a VM Machine with my Rhel5 and a CEntos copy as well.
I am using a laptop HP DV4, I use wireless on the laptop.
Usually when I boot up in to either machine I would get eht0 and lo as usual now I just don't get... (4 Replies)
hi folks,
please help me with this, my bash script is not recognizing veritas cluster commands, giving error such as "bash: hastatus: command not found".
the piece of code is
ssh -p 22022 test02 'hastatus -sum |grep j2ee|grep -i online' > /tmp/j2ee.log (2 Replies)
Hi,
I need to know what are the storages attached to some of our corporate servers. I run this command from the server only to get a list of WWNs :
# /usr/local/bin/evainfo -a
Devicefile Array WWNN Capacity ... (1 Reply)
Discussion started by: anaigini45
1 Replies
LEARN ABOUT HPUX
realpath
realpath(3X)realpath(3X)NAME
realpath - resolve pathname
SYNOPSIS DESCRIPTION
The function derives, from the pathname pointed to by file_name, an absolute pathname that names the same file, whose resolution does not
involve or symbolic links. The generated pathname is stored, up to a maximum of bytes, in the buffer pointed to by resolved_name.
RETURN VALUE
On successful completion, returns a pointer to the resolved name. Otherwise, returns a null pointer and sets errno to indicate the error,
and the contents of the buffer pointed to by resolved_name are undefined.
ERRORS
The function will fail if:
Read or search permission was denied for a component of
file_name.
Either the file_name or resolved_name argument is a null pointer.
An error occurred while reading from the file system.
Too many symbolic links were encountered in resolving
path.
The file_name argument is longer than or a pathname component is longer than
A component of file_name does not name an existing file or file_name points to an empty string.
A component of the path prefix is not a directory.
The function may fail if:
Pathname resolution of a symbolic link produced an intermediate result whose
length exceeds
Insufficient storage space is available.
SEE ALSO sysconf(2), getcwd(3C), thread_safety(5), glossary(9), <stdlib.h>.
CHANGE HISTORY
First released in Issue 4, Version 2.
realpath(3X)