problem with parting using vi in a file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting problem with parting using vi in a file
# 1  
Old 07-02-2009
problem with parting using vi in a file

I am trying to paste around 100 lines into a file using VI and pasting but seems the data is going from left to right in this fashion. Is there any setting that I need to set in vi or terminal? Please let me know.

Quote:
DAY_OF_WK_NAME_UPR VARCHAR2(20 CHAR),
DAY_OF_WK_NBR_SAT NUMBER,
DAY_OF_WK_NBR_SUN NUMBER,
DAY_OF_WK_NBR_MON NUMBER,
HOLIDAY_FLAG VARCHAR2(1 CHAR),
HOLIDAY_FLAG_US VARCHAR2(1 CHAR)
# 2  
Old 07-02-2009
You mean the pasted data looks like this...

Code:
DAY_OF_WK_NAME_UPR VARCHAR2(20 CHAR),
        DAY_OF_WK_NBR_SAT NUMBER,
                DAY_OF_WK_NBR_SUN NUMBER,
                        DAY_OF_WK_NBR_MON NUMBER,
  ...

Then you need to ":set noai" (from command mode - to get there, press Esc. Then : (colon) set noai (meaning no auto-indent). Then paste again.)

You can change this "auto-indent" behaviour permanently by editiing ~/.ex.rc (or some such). Use

Code:
:set

From the VI command mode to see what is set.

Last edited by Scott; 07-02-2009 at 06:00 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. UNIX for Dummies Questions & Answers

File with -rw-r--r-- problem

Hi, I have a file on Sunos with permissions: -rw-r--r-- When I 'more' it...I get the message: *** filename: directory *** And it is acutally a directory. How come there is no 'd' shpwing on the file permission settings? Thanks (2 Replies)
Discussion started by: Grueben
2 Replies

3. Shell Programming and Scripting

Problem in test file operator on a ufsdump archive file mount nfs

Hi, I would like to ask if someone know how to test a files if exist the file is a nfs mount ufsdump archive file.. i used the test operator -f -a h almost all test operator but i failed file1=ufs_root_image.dump || echo "files doesn't exist && exit 1 the false file1 is working but... (0 Replies)
Discussion started by: jao_madn
0 Replies

4. Shell Programming and Scripting

Problem - Log File

Hi, I am in trouble ... again :wall: I formating a log file as .txt from Unix (solaris 9) and then I compress it with gzip and I use uuencode and send it in an email. gzip -c ${fic_report} | uuencode Report_File.gz > ${attachment_file} my problem is when I received the mail with the... (6 Replies)
Discussion started by: Aswex
6 Replies

5. Shell Programming and Scripting

Problem in reading a file

Hi Guys, I am having a file which does not have any name when i do a ls -l -rw-r--r-- 1 dctrdat1 dctrdata 35 Feb 09 08:04 -rw-r--r-- 1 dctrdat1 dctrdata 11961 Feb 08 06:40 DAI_data.txt Now i want to see what is inside that file. Can you please let me know how to read... (9 Replies)
Discussion started by: mac4rfree
9 Replies

6. Shell Programming and Scripting

Problem with my file...

Hi all... I have a text file which i want to move to some remote directory... when i use command prompt to ftp that textfile,.. after ftp if i check the file by using vi i can see many ^M with the starting and end of each line... instead if i use grab and drop method to copy that... (5 Replies)
Discussion started by: smarty86
5 Replies

7. Shell Programming and Scripting

File Spliting problem

I have a very big log file which looks like this: I need to split this file and create files with "+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+" as the delimiter. The file names need to be the contents of the next line after the delimiter(FIRST_ITEM,SECOND_ITEM...so on..). (7 Replies)
Discussion started by: engineer
7 Replies

8. UNIX for Advanced & Expert Users

File access/ Never seen problem!

Dear Guru's, I am being facing strange issue in UNIX. My user name is shah and one more user name is appstest I have a directory created by appstest user i.e. /home/appstest/work ls -ld /home/appstest/work drwxrwxr-x 10 appstest apps 12288 Aug 06 23:41 /home/appstest/work Now I... (1 Reply)
Discussion started by: shahnazurs
1 Replies

9. UNIX for Advanced & Expert Users

Problem in converting password protected excel file to csv file in unix

I need to convert a password protected excel file which will be in UNIX server to a comma separated file. For this I need to open the excel file in UNIX box but the UNIX box doesn't prompt for password instead it is opened in an encrypted manner. I could manually ftp the excel file to local... (2 Replies)
Discussion started by: Devivish
2 Replies

10. UNIX for Dummies Questions & Answers

Problem writing file path to txt file

if test -z "$1" then echo "you must give a filename or filepath" else path=`dirname $1` f_name =`basename $1` if path="." then path=`pwd` fi fi cat $f_name $path >> index.txt The only problem I am encountering with this is writing $path to index.txt Keeps going gaga: cat:... (1 Reply)
Discussion started by: Vintage_hegoog
1 Replies
Login or Register to Ask a Question