10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hallo Team,
I have a simple request and i would appreciate your help.
I would like to use two dates in my script lets:
A=$(date +"%d %B %Y")
echo $A
23 June 2014
That's awesome now we cooking. Now i want B to be on the previous month
eg: echo $B Should give me
23 May 2014
I would... (9 Replies)
Discussion started by: kekanap
9 Replies
2. Programming
Pointers are seeming to get the best of me and I get that error in my program.
Here is the code
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define REPORTHEADING1 " Employee Pay Hours Gross Tax Net\n"
#define REPORTHEADING2 " Name ... (1 Reply)
Discussion started by: Plum
1 Replies
3. Shell Programming and Scripting
new to shell scripting.
below line is showing error in script.
${parameter:=word}
in the o/p first it shows the below error.
word: not found.
and then in next line print "word"
----------------
p2: word: not found.
word
---------------------------
OS is AIX and shell is... (12 Replies)
Discussion started by: scriptor
12 Replies
4. Programming
Compiling xpp (The X Printing Panel) on SL6 (RHEL6 essentially):
xpp.cxx: In constructor ‘printFiles::printFiles(int, char**, int&)’:
xpp.cxx:200: error: invalid conversion from ‘const char*’ to ‘char*’
The same error with all c++ constructors - gcc 4.4.4.
If anyone can throw any light on... (8 Replies)
Discussion started by: GSO
8 Replies
5. Programming
hello everybody!
i have aproblem! i dont know how to concatenate const char* with char
const char *buffer;
char *b;
sprintf(b,"result.txt");
strcat(buffer,b);
thanx in advance (4 Replies)
Discussion started by: nicos
4 Replies
6. Programming
Hello,
I'm trying to write a method which will return the extension of a file given the file's name, e.g. test.txt should return txt. I'm using C so am limited to char pointers and arrays. Here is the code as I have it:
char* getext(char *file)
{
char *extension;
int i, j;... (5 Replies)
Discussion started by: pallak7
5 Replies
7. Shell Programming and Scripting
Hi,
How to replace any character in a file with a newline character using sed ..
Ex:
To replace ',' with newline
Input:
abcd,efgh,ijkl,mnop
Output:
abcd
efgh
ijkl
mnop
Thnx in advance.
Regards,
Sasidhar (5 Replies)
Discussion started by: mightysam
5 Replies
8. UNIX for Dummies Questions & Answers
As you know, when a user logs in, the shell reads the initialization files in an order something like below...
###################
Bourne Shell
/etc/profile > $HOME/.profile
Bash Shell
/etc/profile > $HOME/.bash_profile > $HOME/.bash_login > $HOME/.profile > $HOME/.bashrc
C Shell... (3 Replies)
Discussion started by: SeanWuzHere
3 Replies
9. UNIX for Dummies Questions & Answers
Hi all,
In my shell script, I am reading some files, processing them, and writing the out-put in the log files. The out put contains number of rows in the file etc.
I want to fetch the input files from a particular directory and I want to write the logs in a particular directory with a particular... (1 Reply)
Discussion started by: VENC22
1 Replies
10. Programming
Hi
We are using a code generator for initializing structures with the #define macro. Compiling it with the GCC 2.8.1 (with -ansi) it OK. But when we are using the SUN C 5.0 compiler it screams.
Following is a code sample:
#include <stdlib.h>
#include <stdio.h>
typedef struct TEST3 {... (4 Replies)
Discussion started by: amatsaka
4 Replies