10 More Discussions You Might Find Interesting
1. Emergency UNIX and Linux Support
Hi,
memset call is failing on solaris for me. I wrote below code and that also fails. Any hints?
void *memset(void *dst, int c, size_t n)
{
if (n) {
char *d = dst;
do {
*d++ = c;
} while (--n);
}
return dst;
} (2 Replies)
Discussion started by: skyineyes
2 Replies
2. Shell Programming and Scripting
Hi,
One of my Unix scripts needs to look for files coming in on Fridays. This script runs on Mondays. $date +"%y%m%d" will give me today's date. How can I get previous Friday's date.. can I do "today's date minus 3 days" to get Friday's date? If not, then any other way?? Name of the files is... (4 Replies)
Discussion started by: juzz4fun
4 Replies
3. Programming
Hi guys,
my tool works fine in gentoo, ubuntu now im trying to port it to windows but bzero/bcopy I read aren't working on windows and for better portability I should of use memset() so im trying to translate
bzero(buffer,256);in
printf("MAIL TO");
strcpy(buffer, rcp);
... (4 Replies)
Discussion started by: Jess83
4 Replies
4. Solaris
Hi All,
we have an application that is written in 'C' programming to connects to various servers in the organization.
The bellow code establish a TCP connection to connect to the remote servers. the application works perfectly ok, but, after some time the entire process get's crashed and... (2 Replies)
Discussion started by: sudharma
2 Replies
5. Shell Programming and Scripting
Hi,
I've written a perl script with a nested foreach statement in it.
I have the line
code:
foreach $argn(@arguments) {
foreach $location (@path) {
system("find $location -name \"$argn\" -print >> results.txt");
... (2 Replies)
Discussion started by: tchoruma
2 Replies
6. UNIX for Advanced & Expert Users
Dear Friends,
Can any one tell me the difference between memset and calloc function in C.
Regards,
Selvi (7 Replies)
Discussion started by: salvi
7 Replies
7. Shell Programming and Scripting
Hi All,
I have a perl script(1.pl) that calls a c function defined in another file sample.c
#!/usr/bin/perl
my $re = 1;
my @s = `/home/PERL_SCRIPTING/Rough/sample pline $re 10`;
print "$_" foreach(@s);
The sample.c is as bwlow:
# include <stdio.h>
int pline(int, int);... (4 Replies)
Discussion started by: jisha
4 Replies
8. UNIX for Advanced & Expert Users
Hey all,
:D
Could you please check following way of writing awk is correct or not ???
-----------------------------------------------------------
-----------------------------------------------------------------
Its recursion being called.
tempgrep.txt has :
462948
1311040
880922... (12 Replies)
Discussion started by: varungupta
12 Replies
9. UNIX for Dummies Questions & Answers
HI all ,
please find the piece of code below
char *t;
char *f;
char buf;
memset(buf,0,50);
after that i am assigning memory
for (i=0; i<100; i++)
{
t = buf+(i*6);
f = "ARUN";
}
my question ..
1) i have run this it is... (7 Replies)
Discussion started by: arunkumar_mca
7 Replies
10. UNIX for Dummies Questions & Answers
Hi All, :confused:
I have the following code.
var=' '
sqlplus user/pass@DB <<EOF
whenever sqlerror exit 1
select package.func() into $var from dual;
EOF
echo $var
But, this code does not work to display the value returned by the oracle function. Do we have to bind variables before... (3 Replies)
Discussion started by: rahulrathod
3 Replies