Sponsored Content
Full Discussion: opening a file
Top Forums UNIX for Dummies Questions & Answers opening a file Post 49317 by hiei on Tuesday 30th of March 2004 05:26:48 PM
Old 03-30-2004
opening a file

im trying to open a file in my bin directory and the farthest i can get is into the folder but not the actual file itself i use text edit as the editor. when i try to open the file it says it doesn't exist here is what i type



cd bin
open cmnds (dir. which it is under)
open test
no such file


am i missing something or is that the farthest i can go to opening a file
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Making Changes without opening file

Hello, I'm new to scripting, I have a file test.dat. I want to make changes to it with out openning it. Example: test.dat has rows, and I want to change value "LA" to "TX" without opening it or without writing it to another file. Is it possible? Thanks (9 Replies)
Discussion started by: irehman
9 Replies

2. Shell Programming and Scripting

how to know whether that file has eol or noeol before opening that file in VI editor

Hi, I want to check whether file has EOL or NOEOL before opening this file in VI editor. My file is very big its in terms of 15-20 MB. I am using ksh for this. When we opened the file in vi editor, normally at last line we are able to see whether this is eol or noeol file. But i does want... (1 Reply)
Discussion started by: HariRaju
1 Replies

3. UNIX for Dummies Questions & Answers

Opening a file from the terminal

Hi, this is such a simple question (I think), but I don't know the answer, obviously. If I'm using the terminal, and I'm remotely logged on to another computer, and I'm in my directory on that computer, what command would I use to...open a file? For example, a .exe file, or a .txt file...all I want... (6 Replies)
Discussion started by: Djaunl
6 Replies

4. Shell Programming and Scripting

Deleting lines inside a file without opening the file

Hi, Just consider there are around 10 lines in a file. Now is it possible to delete the first 2 lines in the file without opening the file. No matter whatever the content of the file is, I just wanna delete the first 2 lines without opening the file. Is that possible? If so, please help me out.... (3 Replies)
Discussion started by: toms
3 Replies

5. Programming

Error in opening a file C++

Hi, I have written a function which will open the file with the input name provided.Input name is in string format so while opening I am converting it using c_str().detail code below Plz let me know what is the wrong in code. 1 #include<iostream> 2 #include<fstream> 3 ... (4 Replies)
Discussion started by: forstudy3
4 Replies

6. Programming

Problem in opening a file!

Hello All, I am new to programming in unix. I am trying to create a file by using open command. The entire file is : #include<fcntl.h> main(void){ int fd; fd = open("File1", O_CREAT|O_WRONLY, S_IRUSR|S_IWUSR|S_IRWXO); printf("%d ", fd); } The problem I am facing a strange problem.... (2 Replies)
Discussion started by: vkn_1985
2 Replies

7. Shell Programming and Scripting

Xmllint - Xml-file problem --ods file not opening

Dear All, this is my first post on this Forum, glad to be here. I'm trying to fix an .ods file. Yes, I had a backup, but it's also corrupted. When opening the document I get this EM: read error format error discovered in the file in sub-document content.xml at 2,337040(row,col). So I... (3 Replies)
Discussion started by: jameslast
3 Replies

8. Shell Programming and Scripting

GZ file not opening in windows

I am zipping a file in unix and then sending it to windows. buyt when i try to open it with 7zip software. it throws an error FILE IS BROKEN (3 Replies)
Discussion started by: rafa_fed2
3 Replies

9. Shell Programming and Scripting

Opening a file in vi and automatically save and quit this file using shell script

Hi friends, In my shell script, I want to open a file using vi editor. After opening the file in vi, I want to save and quit this file automatically.... all through shell script. the code segment is: ------------------------------------------------------------ cd ~/netfpga/projects/scone/sw/... (2 Replies)
Discussion started by: sachinteotia
2 Replies

10. UNIX for Dummies Questions & Answers

How to read a file without opening the file and delete last line?

I have file called "text". The contents are as below : aaa bbb ccc ddd eee ffff ddd hhhh iiii I want to read this file without opening and and delete the last line. How can it be done? (4 Replies)
Discussion started by: the_hunter
4 Replies
COMP(1)                                                              [nmh-1.5]                                                             COMP(1)

NAME
comp - compose a message SYNOPSIS
comp [+folder] [msg] [-form formfile] [-use | -nouse] [-file file] [-draftfolder +folder] [-draftmessage msg] [-nodraftfolder] [-editor editor] [-noedit] [-width columns] [-from address] [-to address] [-cc address] [-fcc +folder] [-subject text] [-whatnowproc program] [-nowhatnowproc] [-version] [-help] DESCRIPTION
Comp is used to create a new message to be mailed. It copies a message form to the draft being composed and then invokes an editor on the draft (unless -noedit is given, in which case the initial edit is suppressed). The default message template "components" will direct comp to construct the message draft as follows: From: {from switch} or <Local-Mailbox> or <username@hostname> To: {to switch} or blank cc: {cc switch} or blank Fcc: {fcc switch} or +outbox Subject: {subject switch} or blank -------- If a file named "components" exists in the user's nmh directory, it will be used instead of this form. You may specify an alternate forms file with the switch -form formfile. You may also start comp using the contents of an existing message as the form. If you supply either a +folder or msg argument, that mes- sage will be used as the message form. You may not supply both a -form formfile and a +folder or msg argument. The line of dashes or a blank line must be left between the header and the body of the message for the message to be identified properly when it is sent (see send(1)). The switch -use directs comp to continue editing an already started message. That is, if a comp (or dist, repl, or forw) is terminated without sending the draft, the draft can be edited again via "comp -use". The -file file switch says to use the named file as the message draft. Forms that are selected via the -form switch are processed via the nmh template system; see mh-format(5) for details. Drafts constructed from another message or with the -use or -file switchs will NOT be processed with mh-format(5). In addition to the standard mh-format(5) escapes, the following component escapes are either new or have an alternate meaning: Escape Returns Description fcc string Any folders specified with `-fcc folder' from string Any addresses specified with `-from address' to string Any addresses specified with `-to address' cc string Any addresses specified with `-cc address' subject string Any text specified with `-subject text' By default the "To:" and "cc:" fields are empty. You may add addresses to these fields with the -to address and -cc address switches. You may give these switches multiple times to add multiple addresses. By default the "From:" field has either the value of the Local-Mailbox profile entry or a system default email address. This default can be overridden by using the -from address switch. The default mailbox in the "Fcc:" field is +outbox. This can be overridden by the -fcc switch. Any text you give to the -subject switch will be placed in the "Subject:" field in the draft. If the draft already exists, comp will ask you as to the disposition of the draft. A reply of quit will abort comp, leaving the draft intact; replace will replace the existing draft with the appropriate form; list will display the draft; use will use the draft for further composition; and refile +folder will file the draft in the given folder, and give you a new draft with the appropriate form. (The +folder argument to refile is required.) The -draftfolder +folder and -draftmessage msg switches invoke the nmh draft folder facility. This is an advanced (and highly useful) fea- ture. Consult the mh-draft(5) man page for more information. The -editor editor switch indicates the editor to use for the initial edit. Upon exiting from the editor, comp will invoke the whatnow program. See whatnow(1) for a discussion of available options. The invocation of this program can be inhibited by using the -nowhatnow- proc switch. (In truth of fact, it is the whatnow program which starts the initial edit. Hence, -nowhatnowproc will prevent any edit from occurring.) FILES
/etc/nmh/components The standard message skeleton or <mh-dir>/components Rather than the standard skeleton $HOME/.mh_profile The user profile <mh-dir>/draft The draft file PROFILE COMPONENTS
Path: To determine the user's nmh directory Draft-Folder: To find the default draft-folder Editor: To override the default editor Msg-Protect: To set mode when creating a new message (draft) fileproc: Program to refile the message whatnowproc: Program to ask the "What now?" questions SEE ALSO
dist(1), forw(1), repl(1), send(1), whatnow(1), mh-profile(5) DEFAULTS
`+folder' defaults to the current folder `msg' defaults to the current message `-nodraftfolder' `-nouse' CONTEXT
None BUGS
If whatnowproc is whatnow, then comp uses a built-in whatnow, it does not actually run the whatnow program. Hence, if you define your own whatnowproc, don't call it whatnow since comp won't run it. MH.6.8 11 June 2012 COMP(1)
All times are GMT -4. The time now is 08:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy