HPUX
If I use
crontab -e
and do not make any changes the following message is displayed when
exiting vi:
"The crontab file was not changed."
How do you get vi to do this for any file you view?
How do you get vi to do this for any file you view?
Hmmm, lets try with an HP-UX-box:
% uname -a
HP-UX otso B.10.20 A 9000/785 <clip>
$ vi foo
foo
~
ESC-:q
No write since last change (:quit! overrides)
So, I say vi on HP-UX is not broken, at least not *that* broken. Now,
please tell us what's exactly your problem? I think it's something
else thaty you say it is.
--
# http://arska.org/hauva/ #
print "Navigare necesse est, vivere non est necesse - Pompeius\n";
> HPUX
> If I use
> crontab -e
> and do not make any changes the following message is displayed when
> exiting vi:
> "The crontab file was not changed."
> How do you get vi to do this for any file you view?
HTH
#!/bin/sh
if [ -f $1 ]; then
cp $1 $1.sav
vi $1
CHK=`sum $1 $1.sav |cut -d " " -f 1|head -1`
CHK1=`sum $1 $1.sav |cut -d " " -f 1|tail -1`
if [ $CHK = $CHK1 ]; then
echo "$1 has not changed."
else
echo "$1 has been modified."
fi
rm -f $1.sav
else
vi $1
echo "$1 did not exist before."
fi
--
Chuck Geigner ---------------------------------------
AIX Sysop
Milner Library, Illinois State Univ.
"Been borrowing Occam's shaving instrument since 1992
Haven't cut myself yet."_____________#rgvac==mongoose
> > HPUX
> > If I use
> > crontab -e
> > and do not make any changes the following message is displayed when
> > exiting vi:
> > "The crontab file was not changed."
> > How do you get vi to do this for any file you view?
> Well, I threw this together; It seems to do what you want. Just name it
> and then call it in lieu of vi (it calls vi internally) when editing a
> file (only handles 1, modify if you need to do batches).
> HTH
> #!/bin/sh
> if [ -f $1 ]; then
> cp $1 $1.sav
> vi $1
> CHK=`sum $1 $1.sav |cut -d " " -f 1|head -1`
> CHK1=`sum $1 $1.sav |cut -d " " -f 1|tail -1`
> if [ $CHK = $CHK1 ]; then
> echo "$1 has not changed."
> else
> echo "$1 has been modified."
> fi
> rm -f $1.sav
> else
> vi $1
> echo "$1 did not exist before."
> fi
instead of your CHK bit?
> > > HPUX
> > > If I use
> > > crontab -e
> > > and do not make any changes the following message is displayed when
> > > exiting vi:
> > > "The crontab file was not changed."
> > > How do you get vi to do this for any file you view?
> > Well, I threw this together; It seems to do what you want. Just name it
> > and then call it in lieu of vi (it calls vi internally) when editing a
> > file (only handles 1, modify if you need to do batches).
> > HTH
> > #!/bin/sh
> > if [ -f $1 ]; then
> > cp $1 $1.sav
> > vi $1
> > CHK=`sum $1 $1.sav |cut -d " " -f 1|head -1`
> > CHK1=`sum $1 $1.sav |cut -d " " -f 1|tail -1`
> > if [ $CHK = $CHK1 ]; then
> > echo "$1 has not changed."
> > else
> > echo "$1 has been modified."
> > fi
> > rm -f $1.sav
> > else
> > vi $1
> > echo "$1 did not exist before."
> > fi
> What about:
> if cmp -s $1 $1.sav; then
> echo "$1 has not changed."
> else
> echo "$1 has been modified."
> fi
> instead of your CHK bit?
> What about:
> if cmp -s $1 $1.sav; then
> echo "$1 has not changed."
> else
> echo "$1 has been modified."
> fi
> instead of your CHK bit?
Thanks Ben.
--
Chuck Geigner ---------------------------------------
AIX Sysop
Milner Library, Illinois State Univ.
"Been borrowing Occam's shaving instrument since 1992
Haven't cut myself yet."_____________#rgvac==mongoose
1. AfterStep does not save settings upon exit
I am stumped at something that happened to me today. After adding
another menu to my AfterStep menu list and restarting the session, it
only stays there until next logon. With my next logon, all my custom
menus are gone without a trace! Could someone, please, let me know
what's happening here? I hope, I won't have to launch all my programs
via terminal window... :-(
--
Bolek,
URL: http://www.bolek.com/
New Jersey, US
2. LINUX 1.2.x & secondary EIDE controller setup problem
3. how to indicate current vi mode?
4. htpasswd encryption for Windows
5. fix to crontab problem ("no changes made to crontab")
7. What DoS am I getting from nessus?
9. How to make vi not clear screen when exiting?
10. Changing Kernel - what am I doing wrong?
11. crontab -e or crontab -l is not functioning properly
12. crontab entries generate error message; problem with ownership of crontab file?
13. To crontab or NOT to crontab!!!