Sponsored Content
Full Discussion: Copy code to vi
Top Forums UNIX for Dummies Questions & Answers Copy code to vi Post 48660 by rooh on Friday 12th of March 2004 06:57:42 PM
Old 03-12-2004
Hi ,

Basically this is what I am doing.

Suppose my .txt file looks like this
Code:
# check that the file exists
	Say Hello all
		Do it correctly
	place it on the server
	Do all you can
	Save as much as you can
	Think for the rainy day
	Life is a bed of thorns and face it,either smilingly or you wet ur face

Now when I copy these lines and paste it on a vi i.e.
vi tmp_rooh.ksh

It looks like the one below
***********************************************
Code:
# check that the file exists
        Say Hello all
                        Do it correctly
                                place it on the server
                                        Do all you can
                                                Save as much as you can
                                                        Think for the rainy day
                                                                Life is a bed of thorns and face it,either smilingly or you w
et ur face

*************************************************
I want it to look exactly the same as the one in .txt and not like the one above.

Hope this makes it a bit clear.
If it just a few lines of code I can manually do it but there are codes of 1000's of lines and I need to copy them from the text file and put it on unix .

Thanks

Code tags added -- Perderabo

Last edited by Perderabo; 03-12-2004 at 11:32 PM..
 

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Copy code from shell

Hi everyone.. I'm a full-fledged newbie so bear with me. =) I'm running code in the shell, and I'd like to copy the lines into a text file. Everytime I try using Contrl-C, the lines repeat as code. Is there some sort of export history function I can use? (1 Reply)
Discussion started by: yohoshua
1 Replies

2. UNIX for Dummies Questions & Answers

What is in-core copy and disk-copy of i-node table?

I have found a question from the exercises of my study mat. The question is "Why are there a in-core copy and a disk-copy of i-node block and super block?" If any one know the proper answer then please send me..... (1 Reply)
Discussion started by: dearanik
1 Replies

3. Solaris

Need help with copy

Hi Gurus, I need some help to fulfill the following requirement. I have a file A and some contents in it and I have file B and some conent in it. I need to append the contents on File A to FIle B. I am sure its Basics but missing it. Thank You, Rama (1 Reply)
Discussion started by: rama krishna
1 Replies

4. Shell Programming and Scripting

how to copy the directory but not copy certain file

Hi experts cp bin root src /mnt but not copy bin/bigfile any help? ( I post this thread in the "redhat" forum wrongly, I don't know how to withdraw that question in that wrong forum) Thanks (6 Replies)
Discussion started by: yanglei_fage
6 Replies

5. Shell Programming and Scripting

Copy-pasted code behaves diffrent

Heyas I'm currently attempting to apply the code of tui-select to tui-list. That is because tui-list simply made a 1 string list, while tui-select uses dynamicly up to 3 strings per line. Anyway, so i copy pasted the code, and just made the changes marked with red.... Know that both scripts... (2 Replies)
Discussion started by: sea
2 Replies

6. Shell Programming and Scripting

Need help with script to copy code to multiple servers

Hi, I am new to scripting and i am trying to use below script to copy code to multiple servers and multiple locations on each server. the script is not working or doesnt give any error. Any help is appreciated. basically i want a script to get the code from a location (dir below) and read the... (2 Replies)
Discussion started by: Ron0612
2 Replies
GENLIB_COPY_UP_ALL_CON.3(October 1, 1997)								 GENLIB_COPY_UP_ALL_CON.3(October 1, 1997)

NAME
GENLIB_COPY_UP_ALL_CON - copy all physical connectors of an instance face in the current figure SYNOPSYS
#include <genlib.h> void GENLIB_COPY_UP_ALL_CON(face, insname, concatenate) char face, concatenate; char *insname; ORIGIN
This software belongs to the ALLIANCE CAD SYSTEM developed by the ASIM team at LIP6 laboratory of Universite Pierre et Marie CURIE, in Paris, France. Web : http://asim.lip6.fr/recherche/alliance/ E-mail : alliance-users@asim.lip6.fr PARAMETERS
face Face of the instance insname Name of the instance the connector belongs to concatenate Indicates wheter or not to concatenate instance connectors names with instance name DESCRIPTION
COPY_UP_ALL_CON copies all instance connectors of the face face of the placed instance called insname into the current layout. The con- catenate argument may take two values: YES then the resulting name of a connector in the current figure is the concatenation of the insname and the conname. It warranties the unicity of name at the figure level, and is to be used most of the time. NO implies a direct copy of the connector name. The user must take care of the unicity of connector name by itself. Two behaviour are expected, depending on each of the instance connectors location regarding the abutment box of the current figure. Connector on the abutment box The figure connector is place right over the instance connector. The single connector is duplicated. Connector inside the abutment box The instance connector face is computed in the figure, and then, the connector is duplicated on the given face, at the right coordinates for this face. Then a wire is drawn between the instance connector and the figure connector in the connector layer. ERRORS
"GENLIB_COPY_UP_ALL_CON impossible : missing GENLIB_DEF_PHFIG" No figure has been yet specified by a call to DEF_PHFIG. So it isn't possible to place a connector inside it. you must call DEF_PHFIG before any other layout action. "*** genlib error *** GENLIB_COPY_UP_ALL_CON impossible : connector conname face face of instance insname, current figure doesn't exist" No connector matches both the conname and the face arguments. EXAMPLE
#include <genlib.h> main() { /* Create a figure to work on */ GENLIB_DEF_PHFIG("cell"); . . GENLIB_PLACE_LEFT("gaer0_f", "insN", SYMXY); . . GENLIB_DEF_AB(0L, 0L, 0L, 0L); /* Copy all connectors */ GENLIB_COPY_UP_ALL_CON(NORTH, "insN", YES); /* Save that on disk */ GENLIB_SAVE_PHFIG(); } SEE ALSO
genlib(1), GENLIB_DEF_PHFIG(3), GENLIB_SAVE_PHFIG(3), GENLIB_COPY_UP_CON(3), GENLIB_COPY_UP_CON_FACE(3), GENLIB_PHCON(3), GEN- LIB_THRU_CON_H(3), GENLIB_THRU_CON_V(3). BUG REPORT
This tool is under development at the ASIM department of the LIP6 laboratory. We need your feedback to improve documentation and tools. PROCEDURAL GENERATION LANGUAGE
ASIM/LIP6 GENLIB_COPY_UP_ALL_CON.3(October 1, 1997)
All times are GMT -4. The time now is 07:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy