Edit txt?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Edit txt?
# 1  
Old 03-20-2002
Question Edit txt?

Hi!
A windows user going UNIX on part time, oh no?!!

So my question is how I edit and save documents in UNIX? In DOS you can type 'edit x.txt' to both create a new file and edit a file that already exists. How do I do this in Unix?
# 2  
Old 03-20-2002
You can use vi text editor in Unix

vi [-eFGlRrSv] [-c cmd] [-t tag] [-w size] [file]

Vi is a screen oriented text editor. vi have different interfaces to the same program, and it is possible to switch back and forth during an edit session. View is the equivalent of using the -R (read-only) option of vi.

Command input for vi is read from the standard input. In the vi interface, it is an error if standard input is not a terminal.

Vi is a screen editor. This means that it takes up almost the entire screen, displaying part of the file on each screen line, except for the last line of the screen. The last line of the screen is used for you to give commands to vi, and for vi to give information to you.

The other fact that you need to understand is that vi is a modeful editor.

Ex:
dd Delete the line the cursor is on.
x Delete the character the cursor is on.
:w Save the Works that u done
:q Quit from vi editor
:q! Quit without saving the work that you edit

Do check your Unix system vi man pages for more info
# 3  
Old 03-20-2002
Lightbulb Thanks!

I think I start to get a grip of it now... Smilie
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

I can't edit a txt file shared from Window server to Solaris

Hello, I'm working with Solaris and I need to share files between Windows Server 2012 and Solaris through an authentication with an Active Directory user, where Windows Server is the "main server". All was going good, until after see the WS files and I tried to open one and modify it, but I cannot... (1 Reply)
Discussion started by: QeratD0
1 Replies

2. Shell Programming and Scripting

Desired output.txt for reading txt file using awk?

Dear all, I have a huge txt file (DATA.txt) with the following content . From this txt file, I want the following output using some shell script. Any help is greatly appreciated. Greetings, emily DATA.txt (snippet of the huge text file) 407202849... (2 Replies)
Discussion started by: emily
2 Replies

3. Shell Programming and Scripting

To transpose columns + edit in a txt file

Hi, I have a txt file that looks like log2FoldChange Ontology_term 8.50624450251828 GO:0003700,GO:0003707,GO:0005634,GO:0006355,GO:0043401,GO:0003700,GO:0005634,GO:0006355,GO:0008270,GO:0043565 7.03936870356684 GO:0005515,GO:0008080 6.49606183738682 6.49525073909629 GO:0005515... (4 Replies)
Discussion started by: alisrpp
4 Replies

4. Shell Programming and Scripting

Need to append the date | abcddate.txt to the first line of my txt file

I want to add/append the info in the following format to my.txt file. 20130702|abcd20130702.txt FN|SN|DOB I tried the below script but it throws me some exceptions. <#!/bin/sh dt = date '+%y%m%d'members; echo $dt+|+members+$dt; /usr/bin/awk -f BEGIN { FS="|"; OFS="|"; } { print... (6 Replies)
Discussion started by: harik1982
6 Replies

5. Shell Programming and Scripting

awk append fileA.txt to growing file B.txt

This is appending a column. My question is fairly simple. I have a program generating data in a form like so: 1 20 2 22 3 23 4 12 5 43 For ever iteration I'm generating this data. I have the basic idea with cut -f 2 fileA.txt | paste -d >> FileB.txt ???? I want FileB.txt to grow, and... (4 Replies)
Discussion started by: theawknewbie
4 Replies

6. UNIX for Dummies Questions & Answers

find lines in file1.txt not found in file2.txt memory problem

I have a diff command that does what I want but when comparing large text/log files, it uses up all the memory I have (sometimes over 8gig of memory) diff file1.txt file2.txt | grep '^<'| awk '{$1="";print $0}' | sed 's/^ *//' Is there a better more efficient way to find the lines in one file... (5 Replies)
Discussion started by: raptor25
5 Replies

7. Shell Programming and Scripting

How to edit a txt file ?

Hi, I need to edit a text file which is like this.. -- D3341000600 AGEC901164 XYZ SE0109 1RNVX AH 2009-01-19 2009-01-11 2009-01-21 -- D3341000600 AGEC901164 XYZ SE0109 1RNVX AH 2009-01-19 2009-01-11 2009-01-21 -- D3341006000 AGEC921472 ... (4 Replies)
Discussion started by: RRVARMA
4 Replies

8. UNIX for Dummies Questions & Answers

echo "ABC" > file1.txt file2.txt file3.txt

Hi Guru's, I need to create 3 files with the contents "ABC" using single command. Iam using: echo "ABC" > file1.txt file2.txt file3.txt the above command is not working. pls help me... With Regards / Ganapati (4 Replies)
Discussion started by: ganapati
4 Replies

9. Shell Programming and Scripting

Edit txt file using vi editor

Dear All I have a file called sample.txt which contains as follows HR Files records Loaded RecordDate Unloaded -- ---- -------- --------- ------------ ------ 00 567 77777 67896 0 0 01 345 345567 45678 0 ... (1 Reply)
Discussion started by: tkbharani
1 Replies

10. AIX

How to edit txt file by shell script?

What I want to do is just delete some lines from a text file, I know it's easy using copy and redirect function, but what I have to do is edit this file (delete the lines) directly, as new lines may be added to the text file during this period. Can AIX do this ? # cat text 1:line1 2:line2... (3 Replies)
Discussion started by: dupeng
3 Replies
Login or Register to Ask a Question