I'm new to shell scripting, and I need to do a diff between two dirs. One of them (dir_old) contains many files, and the other (dir_new) contains just a set of 8 files, all starting with MC and extension .CP.
The problem I have is that dir_old contains about 20 files that start with MC and with no extension, so I need to check if the files in dir_new exist before using the diff.
Assume $x equals "".
If I try:
if test -n $x
I get the "Expression syntax" error.
It works in Linux but not in unix bash. In unix bourne I get "test: argument expected" (4 Replies)
I'm very new to C and could use a little help.
I'm testing to make sure the command is running as it's proper name, if not then fail.
if (strcmp(argv, "xinit") != 0) {
fprintf(stdout, "name = %s length = %d\n",argv,l);
usage(0);
}
This works if the command is... (3 Replies)
AIX, Solaris, Linux Test Environment Design Question
We want to set an AIX, Solaris & Linux test environment. Here are the hardware equipments:
(1) A Sunfire v100 (or v120), 1GB memory, two 36GB HDD.
(2) An IBM pSeries 7026, 1 GB memory, 4 9GB HDD.
(3) Five external HDD with SCSI... (4 Replies)
AIX, Solaris, Linux Test Environment Design Question
We want to set an AIX, Solaris & Linux test environment. Here are the hardware equipments:
(1) A Sunfire v100 (or v120), 1GB memory, two 36GB HDD.
(2) An IBM pSeries 7026, 1 GB memory, 4 9GB HDD.
(3) Five external HDD with SCSI... (1 Reply)
Hello again, I have a script on my media server that wakes up my backup server, performs an 'rsync' backup, then shuts the backup server down. Currently, I have it send the Wake on LAN packet, and sleep for 5 minutes, just to give the backup server time to boot (of course it doesn't take that long,... (11 Replies)
This is the code:
while test 1 -eq 1
do
read a
$a
if test $a = stop
then
break
fi
done
I read a command on every loop an execute it.
I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test.
For example echo hello.
Now the... (1 Reply)
hello,
i'v trying to use the TEST command and i have some problems with it.
i am trying kill all proccess wich is greater than 25.
i started with - ps -f | grep -v TTY | awk '{print $4}'
but i dont know how to proceed from here..
10x a lot, Daniel. (11 Replies)
Hi,
I am trying to check if two input files exist before the rest of the scripts is run. Following is the code that I have but it gives me syntax error.
if
then
echo "File not found"
else
echo "File found"
fi (3 Replies)
Discussion started by: nua7
3 Replies
LEARN ABOUT OPENSOLARIS
bzdiff
BZDIFF(1) General Commands Manual BZDIFF(1)NAME
bzcmp, bzdiff - compare bzip2 compressed files
SYNOPSIS
bzcmp [ cmp_options ] file1 [ file2 ]
bzdiff [ diff_options ] file1 [ file2 ]
DESCRIPTION
Bzcmp and bzdiff are used to invoke the cmp or the diff program on bzip2 compressed files. All options specified are passed directly to
cmp or diff. If only 1 file is specified, then the files compared are file1 and an uncompressed file1.bz2. If two files are specified,
then they are uncompressed if necessary and fed to cmp or diff. The exit status from cmp or diff is preserved.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+--------------------+-----------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+--------------------+-----------------+
|Availability | SUNWbzip |
+--------------------+-----------------+
|Interface Stability | Committed |
+--------------------+-----------------+
SEE ALSO cmp(1), diff(1), bzmore(1), bzless(1), bzgrep(1), bzip2(1)BUGS
Messages from the cmp or diff programs refer to temporary filenames instead of those specified.
BZDIFF(1)