How to add some content in any file at some desired location
without using VI or some other editor in UNIX
Answers were Sorted based on User's Feedback
Answer / tony
A one line piece of text can always be added like this:
$ echo "Please add this text" >> file.txt
A file (a text file preferably) can be added:
$ cat inputfile.txt >> outputfile.txt
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / sujitha
We can use "Cat" command same as to work like VI to create
and save a file
example : cat>filename
Hi { we can enter content }
Hello
----
------
(ctrl+c) - It will Save in a file
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the different commands available to check the disk usage?
why did you apply to shell
In a file , how to retrieve the lines which are the multiples of 50 ? like 50,100,150th lines etc.
How are shells born?
How to print the first array element?
How will you pass and access arguments to a script in linux?
What is the first line in every perl script called?
How to initialize a directory size to a variable??
Devise a script that takes file name as arguement(which must present in the current directory)and locates from your home directory tree all thpath names of its links.Then mail the list to self.
How does path variable work?
What is batch file programming?
Write a shell program to test whether a given number is even or odd?