10-27-2009
I like the awk approach. How can I use the awk statement for FileA that is 50 lines long?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I would like to define a script in order to update a file with the last updated records:
I wrote :
#!/bin/sh
YEAR=$(date +%Y)
MONTH=$(date +%m)
DAY=$(date +%d)
COMM=/usr/bin/comm
for file in * ;
do
if ] ; then
FILE=${DPSTY}
UNIQUE=Unique_${FILE}
... (4 Replies)
Discussion started by: dbfree
4 Replies
2. Solaris
Hi all,
i want to know which file is updated after changes the modifications/new entries in crontab.
Please help regarding this.
regards
Krishna (1 Reply)
Discussion started by: krishna176
1 Replies
3. UNIX for Dummies Questions & Answers
Hi all,
my problem is teh following:
I need to move a file from a folder to another and I usually do it by the get command but in this case I have a list of file in the source folder and I have to select only the lust updated one.
Ho to do this?
All the files have the same name followed... (4 Replies)
Discussion started by: callimaco0082
4 Replies
4. Programming
hi all, i'm a student and managing lab at my insti. there in one application in which log file has to be maintaine the number of bytes transferred and received. but after certain entries these two attributes stop getting updated and holds same values for rest of the session. This happens one time... (4 Replies)
Discussion started by: KornFire
4 Replies
5. Shell Programming and Scripting
Put this together from somewhere else on the forums, just modified it and added the loop.
#!/bin/ksh
localFile=$1
remoteFile=$2
#source FTP parameters
. .ftp_put.cfg
mylog=ftp_session.log
echo "$(date "+%H:%M:%S") - Attempt to FTP $1 to $2" > $mylog
machine="server1 server2... (5 Replies)
Discussion started by: cbo0485
5 Replies
6. Shell Programming and Scripting
Hello,
I need to evaluate (under BASH) if the certain file has been updated or not. If the file still wasn't updated, script should wait. The script picks up the time stamp of the file using command OldTimestamp=$(date -r $MyDir/$MyFile), but I don't know how to code a waiting loop with new and... (6 Replies)
Discussion started by: sameucho
6 Replies
7. Shell Programming and Scripting
#!/bin/sh
#set -x
Current_Date=`date +"%b %e"`
Filepmdate=`ls -ltr /file/ | tail -5 | awk '{print $6,$7}'`
if ; then
echo " "
exit 0
else
echo "Log files are not updated please check"
exit 0
fi
done
> sh -x l12.sh
+ + date +%b %e
Current_Date=Aug... (2 Replies)
Discussion started by: arch12
2 Replies
8. Shell Programming and Scripting
Hi,
I am looking for a command to search for a specific file which was recently modified in the current directory leaving some unwanted files to be listed.
For example, when I try ls - lrt
it shows the following output.
I want to ommit the files with the name 'resend' and... (3 Replies)
Discussion started by: svajhala
3 Replies
9. Shell Programming and Scripting
Is there any command to know what updated last in file? (3 Replies)
Discussion started by: anuragpgtgerman
3 Replies
10. UNIX for Dummies Questions & Answers
Input File1 constatntly running and growing in size.
My Program Erorr ddmmyy hh:mm:ss My Program Error
**Port 123 terminated
**ID PIN 12345
Comamnd Successful
Command Terminated
Command Successful
Command Terminated
**My Program Erorr ddmmyy hh:mm:ss My Program Error
**Port 345... (3 Replies)
Discussion started by: eurouno
3 Replies
LEARN ABOUT DEBIAN
newton
newton(4rheolef) rheolef-6.1 newton(4rheolef)
NAME
newton -- Newton nonlinear algorithm
DESCRIPTION
Nonlinear Newton algorithm for the resolution of the following problem:
F(u) = 0
A simple call to the algorithm writes:
my_problem P;
field uh (Vh);
newton (P, uh, tol, max_iter);
The my_problem class may contains methods for the evaluation of F (aka residue) and its derivative:
class my_problem {
public:
my_problem();
field residue (const field& uh) const;
void update_derivative (const field& uh) const;
field derivative_solve (const field& mrh) const;
Float norm (const field& uh) const;
Float dual_norm (const field& Muh) const;
};
See the example p-laplacian.h in the user's documentation for more.
IMPLEMENTATION
template <class Problem, class Field>
int newton (Problem P, Field& uh, Float& tol, size_t& max_iter, odiststream *p_derr = 0) {
if (p_derr) *p_derr << "# Newton: n r" << std::endl;
for (size_t n = 0; true; n++) {
Field rh = P.residue(uh);
Float r = P.dual_norm(rh);
if (p_derr) *p_derr << n << " " << r << std::endl;
if (r <= tol) { tol = r; max_iter = n; return 0; }
if (n == max_iter) { tol = r; return 1; }
P.update_derivative (uh);
Field delta_uh = P.derivative_solve (-rh);
uh += delta_uh;
}
}
rheolef-6.1 rheolef-6.1 newton(4rheolef)