I'm having problems getting our network printer back up and running after applying the Solaris 10 x86 Recommended Patch Cluster. The Solaris box was printing just fine before the patch. The problem resolves around the use of Solaris' lp command. If I use the lpr command, everything prints just...
At a quick glance ... your only checking to see if the file exists ... if it does, your setting result to 1 indicating a lock (by having the file specified present). It has nothing to do with the contents of file.
Lord Blood
Can someone please tell me what I am doing wrong? I am trying to send an email with an attachment via shell script. The following is the finalized output. Basically it’s just a sentence and a gif attachment. The sentence appears fine when receiving the email but the attachment is always 0 bytes...
I've setup my my.cnf file on the slave as:
[mysql.server]
user=mysql
basedir=/var/lib
socket=/var/lib/mysql/mysql.sock
server-id=2
master-host=xxx.xxxxx.com
master-user=replicate
master-password=xxxxx
Show slave status indicates "NO" under Slave_running, and I get
mysql> slave start...
I'm a C programmer attempting to learn more about C++ programming. I've been looking at C++ header files to familiarize myself with class declarations. I understand a fair amount about how the class structure works but I'm trying to figure out this:
(from exception.h on a SUN Solaris workshop...
You can try something like this( I didnt know if you wanted the names on the same entry or different entries... this is different entry for each first / last name combination):
#!/usr/bin/csh
#
# Solaris Unix
echo -n "FIRSTNAME: "
set first = ( `echo $<` )
echo -n "LAST NAME...
Try this:
echo -n "FirstName: "
set first = $<
echo -n "LastName: "
set last = $<
if (`fgrep -c $last .phonebook`) then
echo -n "**ERROR**"
else
printf "%s:%s:::\n" $first $last >> .phonebook
endif
I believe your error comes from the fact...
;-) Just to add my 2 cents...
If you attempt the SAIR certification (which my company wants me to complete) and your looking for books to study, I would suggest not buying their books. I'd use a third party book because the SAIR books are full of typos and mistakes. I have read 3 SAIR books...
Just something to think about ;-). Not fully tested!
You can try something like this ... (using C on Linux):
Output is like:
DIR: X
FILE: afile.c
FILE: bfile.c
.
.
.
#include <stdio.h>
#include <sys/types.h>
#include <dirent.h>
#include <sys/stat.h>
#include <unistd.h>
void...
You can just set the bit with something like (Solaris):
var |= (1 << bit_to_set);
----------------------
...
var |= (1 << 0); /*First bit ... shift 0 bits*/
var |= (1 << 1); /*Second bit ... shift 1 bit*/
printf("%d\n", var); /* Prints 3 (8-bits example) 00000011*/
Just...
If your trying to take a character string "69" (in hex) and make a decimal representation (105 in decimal).
This is just something to think about. I have not fully tested it ... just whipped something up. I'm sure someone can do better ;-)
Try this(take a string and figure out the...
Heres a small example of what you can do... Just something to think about ;-)
#include <stdio.h>
#include <string.h>
typedef struct tagData
{
int month,
day,
year;
char message[32];
}data_t;
void first_function(data_t *d);
void second_function(data_t *d);
main()
{
data_t mydata...
On my linux box I can do:
$line =~ s/\t/ /eg; # substitute tab with a space
$line = "\\a".${line}; # add \a to the beginning
Hope this gives you something to think about. ;-)
This is how it works on my Solaris machine:
tar -cvfX some.tar loose *.c
where 'loose' is a file containing excluded files so:
List directory
$ls
a.c
b.c
union.c
x_string.c
Cat loose file
%cat loose
union.c
Tar the c files
%tar -cvfX some.tar loose *.c
a a.c 1K
a b.c 1K
a union.c excluded
a...
Try this:
#!/usr/bin/sh
LIST=`ls -1 file*.dat`
for file_name in $LIST
do
if [ -f $file_name -a -s $file_name ]; then
echo "MATCH"
else
echo "NONMATCH"
fi
done
Hope this gives you something to think about. The best teacher is yourself; therefore, I...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.