Hi there! I'm developing a program that allows the user to open and edit files using both an editor and the terminal. Once the user has finished editing the file an update is sent to the logbook that compares the file before and after it was edited - this can only be done if the file is closed (I think) to guarantee the user is finished editing it. Currently I am checking if the file is closed like this:
This method does work but it isn't very effective as the if statement checks if ANY file is open in gedit - not the particular one the user has opened which is what I want to do. I played around with PID's and was unable to find a solution.
Hi,
I unable to open any file using Vi editor,constantly getting the following error,
vi log.log
*** glibc detected *** malloc(): memory corruption: 0x081af510 **
uname -a
Linux sekac092 2.6.5-7.244-bigsmp #1 SMP Mon Dec 12 18:32:25 UTC 2005 i686 athlon i386 GNU/Linux
Also Note
ls... (8 Replies)
Hi all,
I have a shell script that i started editing, only in the midst of which i tried to save the changes i found that the file wasnt been provided with write/execute permissions.
I later have redone the changes and saved the file-
Just curious to know if there was any command wherein... (5 Replies)
helo
I install my product for koren language
I m uisng RHEL -4 operating system
now problem is whenever I open any file
vi filename
I got following error on the screen
E557: Cannot open termcap file
'vt100' not known. Available builtin terminals are:
builtin_ansi
... (1 Reply)
i have following query
e.g i want the VI Editor cursor at line number N instead of 0 while opening the file from unix prompt.
vi filename ??????
Can anyone help? (4 Replies)
Hi Everyone,
# cat a.txt
94,aqqc,62345907,
5,aeec,77,
# cat 1.pl
#!/usr/bin/perl
use strict;
use warnings;
use Date::Manip;
open(my $FA, "/root/a.txt") or die "$!";
while(<$FA>) {
chomp;
my @tmp=split(/\,/, $_);
if (index($tmp, "qq") ne -1) {
... (4 Replies)
I know how to check if any file has a unix process using a file by looking at 'lsof <fullpath/filename>' command.
I think using lsof is very expensive. Also to make it accurate we need to inlcude fullpath of the file.
Is there another command that can tell if a file has a truely active... (12 Replies)
Hi,
I would like to ask about the notepad++ text editor application, Although there are alternative and more great text editor in linux (gedit, geany, jedit) im still using the notepad++ sometimes cause for some of my own reason one of those is the minimalist text(what i mean is notepad++ has a... (2 Replies)
vi: syntax error at line 1: `)' unexpected
when I try to vi into the /etc/vfstab, the return gives me the above error.
how can resolve this so that I can have access into vi. (6 Replies)
Hi,
I am facing a problem regarding .csv file, my script does not read .csv file and if i open this file in vi editor and perform :wq option then only my script reads the .csv file.
Thanks (5 Replies)
Hello Experts,
I need to write a shell script to check if a file is open and something is being written to it. I want to know how OS handles it. I checked with lsof command but it is not working. For a test I did this.
while true; do echo `date` >>abc.txt; done
then I checked
lsof |... (5 Replies)
Discussion started by: shekhar_4_u
5 Replies
LEARN ABOUT SUNOS
gnome-text-editor
gedit(1) User Commands gedit(1)NAME
gnome-text-editor, gedit - Limited functionality text editor for the GNOME desktop.
SYNOPSIS
gnome-text-editor [--debug [-section]] [gnome-std-options] [--help] [--new-document] [--new-window] [--quit] [filename]
gedit [--debug [-section]] [gnome-std-options] [--help] [--new-document] [--new-window] [--quit] [filename]
DESCRIPTION
The gnome-text-editor application is a text editor for the GNOME desktop. The application is also called gedit. You can use gedit as a
shorter command to start the application. The application enables you to edit multiple documents at the same time. Each document resides in
a specific tabbed section of the application window.
When you start the application from the command line, you can specify one or more filenames. When gedit starts, the application opens all
files that you list on the command line.
OPTIONS
The following options are supported:
--debug [-section] Run gedit in debug mode. In debug mode all the functions that are being called dump the function names to the con-
sole. You can specify the following sections for debugging:
o window
o commands
o document
o file
o plugins
o prefs
o print
o search
o undo
o view
o recent
Run gedit --help for more information.
gnome-std-options Standard options available for use with most GNOME applications. See gnome-std-options(5) for more information.
--help Print the command line options.
--new-document Create a new top-level document or tabbed section in an existing instance of gedit.
--new-window Create a new top-level window in an existing instance of gedit.
--quit Quit an existing instance of gedit.
EXTENDED DESCRIPTION
The gedit application accepts pipes, so you can specify a pipe after another command, to load the output of the command into gedit. For
example:
example% ls -l | gedit
EXAMPLES
Example 1: To Edit an ASCII File Named document.txt
example% gedit document.txt
Example 2: To Add a New Tab That Contains an ASCII File Named book.txt
example% gedit --new-document book.txt
Example 3: To Add a New Top-Level Window That Contains an ASCII File Named testfile.txt
example% gedit --new-window testfile.txt
EXIT STATUS
The following exit values are returned:
0 Application exited successfully.
>0 An error occurred.
FILES
The following files are used by this application:
/usr/bin/gnome-text-editor
The executable file for the gnome-text-editor application.
/usr/bin/gedit
A symbolic link to the gnome-text-editor executable file.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWgnome-text-editor |
+-----------------------------+-----------------------------+
| | |
+-----------------------------+-----------------------------+
|Interface stability |External |
+-----------------------------+-----------------------------+
SEE ALSO gnome-std-options(5), libgtksourceview-1.0(3)
Online Help gedit manual.
NOTES
This man page was written by the following people: Paolo Maggi, Chema Celorio, James Willcox, Federico Mena Quintero.
Updated by Brian Cameron, Sun Microsystems Inc., 2003, 2004.
SunOS 5.10 31 Aug 2004 gedit(1)