The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
update a file by key ynixon Shell Programming and Scripting 25 03-29-2007 09:09 AM
How to update a single row in a file with sed brendanf Shell Programming and Scripting 6 08-30-2006 07:44 PM
File update date amne UNIX for Dummies Questions & Answers 2 05-31-2005 08:09 AM
update executable file anent High Level Programming 3 10-19-2001 03:40 PM
Batch file update cfoxwell UNIX for Dummies Questions & Answers 4 10-04-2001 04:50 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-11-2005
piyush_movadiya piyush_movadiya is offline
Registered User
  
 

Join Date: Aug 2005
Posts: 6
Question file update

how to update file in unix ?
  #2 (permalink)  
Old 08-11-2005
vino's Avatar
vino vino is offline Forum Staff  
Supporter (in vino veritas)
  
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,796
Edit it.

Add your contents and save. (?) is one way of doing it.
  #3 (permalink)  
Old 08-11-2005
ssk ssk is offline
Registered User
  
 

Join Date: May 2005
Posts: 25
Smile update ??

You want to update a file means what you exactly want.

Do you want to change the timestamp of the file or contents from the file ?
if contents then obviously us vi editor and make changes.
if you want to change timestamp then use touch command.
check man touch for the same.
  #4 (permalink)  
Old 08-12-2005
piyush_movadiya piyush_movadiya is offline
Registered User
  
 

Join Date: Aug 2005
Posts: 6
Exclamation

i want to change the content of file .
i know vi editor but which command is for update file.
  #5 (permalink)  
Old 08-12-2005
piyush_movadiya piyush_movadiya is offline
Registered User
  
 

Join Date: Aug 2005
Posts: 6
i want to update my content in file.
like account holder deposite may be increase or discrease what i do?
  #6 (permalink)  
Old 08-12-2005
mbb mbb is offline
Registered User
  
 

Join Date: Aug 2001
Location: UK
Posts: 104
Quote:
Originally Posted by piyush_movadiya
i want to update my content in file.
like account holder deposite may be increase or discrease what i do?
Sorry, but your question still seems a little open ended. Lets start with identifiying some of the details of your problem:

1) Is your file a binary file, or ASCII file?
2) What identifies a particular account or entry? e.g. account number
3) What is the record structure for an account or entry?

In general terms you may want to consider using the sed or awk command. Read the contents of your file from standard input. The sed or awk commands will allow you to subsitute some of the input stream as you send it to standard output.
  #7 (permalink)  
Old 08-12-2005
Kelam_Magnus's Avatar
Kelam_Magnus Kelam_Magnus is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2001
Location: DFW McKinney, TX,
Posts: 1,069
Why don't you give us a bit of background...on your job and what you are trying to do...

It would help greatly to understand where you are coming from.




To edit a file simply open it with vi... then edit it and :wq! to save it thereby updating it.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:26 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0