Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


Closed Thread
  Search this Thread
Old 05-22-2006, 01:28 AM   #1
Registered: Dec 2005
Posts: 48

Rep: Reputation: 15
how to delete the file contents using shell scripts

I want to delete the line by line code
without using the intermediatory file.

Please help me to do the same.
Old 05-22-2006, 01:39 AM   #2
Registered: Mar 2005
Location: india
Distribution: FC4, Debian Etch
Posts: 67

Rep: Reputation: Disabled
I didn't get it.
What and why you want to do ?
It you want to empty a file blindly, just type
$ : > filename
Old 05-22-2006, 01:43 AM   #3
Wim Sturkenboom
Senior Member
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Let's continue in the older one
Old 05-26-2006, 11:44 AM   #4
Senior Member
Registered: Apr 2001
Location: Perry, Iowa
Distribution: Mepis , Debian
Posts: 2,692

Rep: Reputation: 45
Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
unix shell script:How to delete the first line in a file?? rche3252 Programming 6 03-03-2010 07:32 AM
how to delete the contents of a file using shell scripts sharad Linux - Software 5 05-22-2006 05:22 AM
How to delete a line from a text file with shell script programming Bassam General 1 01-28-2004 08:51 PM
Delete contents of the file, but not file? mikeshn Linux - General 9 05-28-2003 06:47 AM
Can't delete or list contents of an old kio_http cache,... JaseP Linux - General 3 06-09-2002 03:00 AM

All times are GMT -5. The time now is 01:10 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration