10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a little code block (executing on AIX 7.1) that I cannot understand why the NOTFREE=0 does not appear to be assigned even though it goes through that block. This causes a unary operator issue.
#!/bin/bash
PLATFORM="AIX"
NEEDSPC=3000
set -x
if ; then
lsvg | grep -v rootvg | while... (6 Replies)
Discussion started by: port43
6 Replies
2. Shell Programming and Scripting
Does anyone know how this line in bash works?
local gotbase= force= nicelevel corelimit
local pid base= user= nice= bg= pid_file=
local cgroup=
These lines are part of the daemon function inside the "functions" file at /etc/init.d in RH. (3 Replies)
Discussion started by: Rameshck
3 Replies
3. Programming
Hi,
In the following code,
class A {
public:
void operator=(const A& rhs) {
if (this == &rhs) cout << "self-assigned";
}
};
class B {
A a; // should not be a pointer member, (i.e) A* a
};
int main() {
B b;
b = b; // Ans: self-assigned
}
I am really... (5 Replies)
Discussion started by: royalibrahim
5 Replies
4. Shell Programming and Scripting
I have two directories that are mostly the same:
dir1
dir2
Is there an easy way to take the output of diff and copy files from dir1 that do not exist in dir2 - but copy them to the same path (many nested directories).
am only trying to copy files in dir1 that do not exist in dir2.
... (5 Replies)
Discussion started by: jvsrvcs
5 Replies
5. Programming
Hi,
If I run the following program
class A {
public:
A() { cout << "default" << endl; }
A(const A&) { cout << "copy" << endl; }
};
A tmp;
A fun() {
return tmp;
}
A test() {
A tmp;
cout << &tmp << endl;
return tmp;
} (1 Reply)
Discussion started by: royalibrahim
1 Replies
6. Programming
Hello everyone!
Suppose that I have something like this
A a;
a.mem=new int;
A b = a;
where
class A {
public:
int * mem;
A() : mem(NULL) {
}
~A() {
if (mem!=NULL)
delete mem; (1 Reply)
Discussion started by: bashuser2
1 Replies
7. Programming
Hi All,
I have made the simple following program :-
#include <string>
#include <iostream>
using namespace std;
class A{
private: int val;
public :
A(){cout<<"In A()"<<endl;}
A (const A& aa)
{
cout<<"In copy c'tor"<<endl;
}
};
A f(... (1 Reply)
Discussion started by: shubhranshu
1 Replies
8. Shell Programming and Scripting
I need a new script to 'grep' data from files in var
and send it to another file in var folder with diff output,
but like you now my Now How is very, very small then to have a idea is something like this:
in file text1.txt have a few lines like this one:
Y: { XXX1 { XXX2 YYYY { IIIIIIII... (0 Replies)
Discussion started by: single
0 Replies
9. Shell Programming and Scripting
When reading over some perl code in a software document, I came across an assignment statement like this
$PATH = ${PROJECT}/......./....
In this particular form of scalar variable assignment, what does the curly braces operators do ? Also, what is the benefit in doing scalar assignment this... (3 Replies)
Discussion started by: JamesGoh
3 Replies
10. UNIX for Advanced & Expert Users
I have to synchronize files on two machines, but these are not connected via LAN. Now I'm using DVD's to copy new data.
The question is how can I create a list of files on one machine and having this list archive or copy only new files from other. Are there any standard tools like diff/patch for... (3 Replies)
Discussion started by: Hitori
3 Replies