Sponsored Content
Full Discussion: ways to open a file
Top Forums UNIX for Dummies Questions & Answers ways to open a file Post 302288383 by ynilesh on Tuesday 17th of February 2009 05:32:46 AM
Old 02-17-2009
there are different editors which can be used to open file like vi, emac etc
 

9 More Discussions You Might Find Interesting

1. Tips and Tutorials

12 Ways to Parse a file

A common thing in shell scripting. I came across this script that will be useful for people learning to write script. #!/usr/bin/ksh # # SCRIPT: 12_ways_to_parse.ksh.ksh # # # REV: 1.2.A # # PURPOSE: This script shows the different ways of reading # a file line by line. Again... (0 Replies)
Discussion started by: google
0 Replies

2. UNIX for Dummies Questions & Answers

Ways to know about a command.......

What are the ways to know about a command? (7 Replies)
Discussion started by: g.ashok
7 Replies

3. Red Hat

cannot set user id: Resource temporarily unavailable (not open file/open process related)

First post, sorry to be a bother but this one has been dogging me. I have a process user (java application server) that trips a resource limit every couple weeks and need help finding what limit we're hitting. First, this is what's running: This is the error when jobs are run or the... (0 Replies)
Discussion started by: Katahdin
0 Replies

4. Solaris

Before I delete any file in Unix, How can I check no open file handle is pointing to that file?

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)
Discussion started by: kchinnam
12 Replies

5. Shell Programming and Scripting

AWK help ! or others ways to do it!

Hi! I really need your help! I need to operate the columns separate by ',' of a file with this structure a1,a2,a3 b1,b2,b3,b4,b5 c1,c2 d1,d2,d3 e1 .... and I want the result of this subtractions a1-a1,a2-a1,a3-a1 b1-b1,b2-b1,b3-b1,b4-b1,b5-b1 (10 Replies)
Discussion started by: geparada88
10 Replies

6. UNIX for Dummies Questions & Answers

Different ways to get OS version

I am trying to figure out the OS version of my Linux box. I got three commands: # uname -a Linux test01 2.6.18-238.el5 #1 SMP Thu Jan 13 15:51:15 EST 2011 x86_64 x86_64 x86_64 # cat /proc/version Linux version 2.6.18-238.el5 (mockbuild@builder10.centos.org) (gcc version 4.1.2 20080704... (4 Replies)
Discussion started by: insvf
4 Replies

7. Programming

Sum a number in different ways.

Hello, I need some help to correct my algorithm steps to sum a number. I am confused... please input some steps Example: Let's say a number 5. Now we can get a list of numbers: 1, 2, 3, 4 (less than 5 in sorted order). so the sum could be: 1+4; 2+3 ( 1+1+1+1+1 or 1+2+2 is not a solution). ... (1 Reply)
Discussion started by: sureshcisco
1 Replies

8. Shell Programming and Scripting

Anyway different ways of doing this program

Okay so I'm 13 and my dad set me a challenge of writing a program that check to see if a box is online with input parameter when starting the program so i came back with this.The top commented out bit is what he showed me how to do after i show him my code. #!/bin/sh #in=${@} #tst=`echo... (3 Replies)
Discussion started by: mattylad000
3 Replies

9. Shell Programming and Scripting

Different ways to check a file

to get the checksum of a file on unix systems, you can just use the "cksum" command. i discovered there are some watered down versions of unix systems i have to do some work on. surprisingly, these systems have perl installed on them and awk. so if the cksum command is not available on a... (1 Reply)
Discussion started by: SkySmart
1 Replies
Unidraw(3U)						    InterViews Reference Manual 					       Unidraw(3U)

NAME
Unidraw - one-of-a-kind object for coordinating and controlling a Unidraw application SYNOPSIS
#include <Unidraw/unidraw.h> DESCRIPTION
Unidraw applications create a single instance of a Unidraw object, which does several things. It creates a World, establishing the connec- tion to the underlying window system. It initializes the catalog and other objects, manages editor instances, and defines the application main loop. It also maintains histories of commands that have be executed and reverse-executed for each component hierarchy being edited. Finally, it cleans up internal state when it is deleted to ensure orderly program termination. The Unidraw object must be created before opening any editors but after creating a catalog. Below is the main program for a typical Unidraw application: int main (int argc, char** argv) { AppSpecificCreator creator; Unidraw* unidraw = new Unidraw( new Catalog("appName", &creator), argc, argv, options, properties ); unidraw->Open(new AppSpecificEditor); unidraw->Run(); delete unidraw; return 0; } PUBLIC OPERATIONS
Unidraw( Catalog*, int argc, char** argv, OptionDesc* = nil, PropertyData* = nil ) Unidraw(Catalog*, World*) The first constructor form requires a catalog object and command line argument information. Other arguments include pointers to PropertyData and OptionDesc arrays. This constructor creates a World instance, passing whichever of these arguments are supplied (except the catalog). To specify a World instance explicitly, use the second constructor form. virtual void Run() virtual void Quit() Run initiates the main loop of the program. The call to Run returns when Quit is called. virtual void Update(boolean immedate = false) Bring the screen up to date with the state of the application's objects. By default, this involves moving connectors to their proper positions (by calling Solve on the global csolver object) and telling editors to update themselves (by calling their Update functions). Because Update may carry out potentially lengthy operations, Unidraw batches Update calls by default. This ensures that multiple consecutive calls do not induce redundant computations. To force an immediate update, simply call Update(true). virtual void Open(Editor*) virtual boolean Opened(Editor*) Open inserts an editor into the world, making it visible on the display. The user positions the editor's window by default. Opened returns whether an editor has been opened already. virtual void Close(Editor*) virtual void CloseDependents(Component*) virtual void CloseAll() Close closes a specified editor, removing it from the user's view and deleting it. CloseDependents closes those editors that report a dependence on the given component via their DependsOn operation. CloseAll closes all open editors. ~Unidraw calls CloseAll. void First(Iterator&) void Next(Iterator&) boolean Done(Iterator) Operations for iterating over the Unidraw object's list of open editors. First initializes an iterator to point to the beginning of the list, Next increments the iterator to point to the following editor, and Done returns whether or not the iterator points beyond the first or last editor in the list. Editor* GetEditor(Iterator) Return the editor to which an iterator points. Editor* Find(Component*) Editor* FindAny(Component*) Operations for finding an (or the) editor associated with a given component. Find searches the list of editors for the one whose GetComponent operation returns the given component. FindAny returns the first editor in the list whose GetComponent operation returns a component in the same hierarchy as the the given component. Catalog* GetCatalog() Return the catalog passed to the constructor. World* GetWorld() Return the world object, which the Unidraw object creates when it is instantiated. void Log(Command*) void Undo(Component*, int i = 1) void Redo(Component*, int i = 1) The Unidraw object maintains histories of commands associated with a given component hierarchy. There are two command histories per hierarchy: the past history and the future history. These histories normally contain commands that have been executed and unexe- cuted to support arbitrary level undo and redo. For example, after a viewer executes the command that a tool generates by inter- preting a manipulator, it will record that command in a past history for possible undoing in the future. The Log operation logs a command, placing it on the past history for the component hierarchy being edited. Log determines the past that is approprate from the command's editor, which specifies the component (hence the hierarchy) that it is editing. Undo reverse- executes the last i commands that were logged for a given component's hierarchy and moves them from their past history to the corre- sponding future history. Redo re-executes the future i commands and moves them to the past. Note that calling Redo without a pre- ceding Undo is meaningless; thus calling Log will clear the future history associated with the affected component hierarchy. void SetHistoryLength(int) int GetHistoryLength() Assign and retrieve the maximum command history length. No more than this many commands can be undone and redone. The default length is 20. Older commands are deleted automatically as new commands are logged. void ClearHistory(Component* = nil) Clear the past and future for a given component hierarchy, deleting the corresponding commands. All histories are cleared if no component is specified. void ClearHistory(Editor*) Clear the history associated with the given editor's component if no other editor is editing the same hierarchy. For example, Unidraw::Close calls this operation to avoid clearing histories when a component hierarchy is being edited in multiple editors. PROTECTED OPERATIONS
virtual void Process() Process is called once in the main loop defined by the Run operation. It does nothing by default. Subclasses may redefine Process to carry out any processing that should be done in each pass through the main loop. boolean IsClean(Editor*) This convenience function queries the given editor for a ModifStatusVar instance. If it has one, then it returns its status (modi- fied or unmodified); otherwise it returns false. void Mark(Editor*) void Sweep(Editor*) These operations support deferred editor deletion, a mechanism to avoid deleting editors prematurely. For example, if a command to close the editor is invoked from a pull-down menu, then the command must not delete the editor, since that will delete the pull-down menu before it has a chance to close. Thus Close and similar operations do not delete editors directly; instead, they call Mark to indicate that an editor should be deleted sometime in the future. Sweep actually deletes the editors that have been marked. By default, Unidraw::Run calls Sweep each time an event is handled. void DoUpdate() A helper function that performs an immediate update independent of the batching mechanism. void GetHistory(Component*, UList*& past, UList*& future) void ClearHistory(UList*, int i = 1) Command histories are stored as ULists. These operations provide a low-level interface to the lists themselves; the corresponding public operations are built on top. GetHistory returns the past and future lists for a given component, while ClearHistory deletes the first i commands on the given list. UList* elem(Iterator) Command* command(UList*) Convenience functions for extracting the list element in an iterator and the command object from the list element. These are useful in conjunction with protected history operations described above. boolean updated() void updated(boolean) The first form of this function returns true if there are pending Update(s) to be performed. The second form sets this value explicitly. boolean alive() void alive(boolean) The first form of this function returns true if the program is in the run loop defined by Run. The second form sets this value explicitly. SEE ALSO
Catalog(3U), Creator(3U), Editor(3U), Interactor(3U), Iterator(3U), Viewer(3I), UList(3U), World(3I), statevars(3U) Unidraw 4 October 1990 Unidraw(3U)
All times are GMT -4. The time now is 09:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy