file update | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


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

file update

Shell Programming and Scripting


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 08-11-2005
piyush_movadiya piyush_movadiya is offline
Registered User
 
Join Date: Aug 2005
Last Activity: 1 October 2005, 2:01 PM EDT
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Question file update

how to update file in unix ?
Sponsored Links
    #2  
Old 08-11-2005
vino's Avatar
vino vino is offline Forum Advisor  
Supporter (in vino veritas)
 
Join Date: Feb 2005
Last Activity: 9 April 2013, 8:19 AM EDT
Location: Sydney, Down Under
Posts: 2,847
Thanks: 0
Thanked 12 Times in 12 Posts
Edit it.

Add your contents and save. (?) is one way of doing it.
Sponsored Links
    #3  
Old 08-11-2005
ssk ssk is offline
Registered User
 
Join Date: May 2005
Last Activity: 3 January 2008, 7:24 AM EST
Posts: 25
Thanks: 0
Thanked 2 Times in 1 Post
Bug 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  
Old 08-12-2005
piyush_movadiya piyush_movadiya is offline
Registered User
 
Join Date: Aug 2005
Last Activity: 1 October 2005, 2:01 PM EDT
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Error

i want to change the content of file .
i know vi editor but which command is for update file.
Sponsored Links
    #5  
Old 08-12-2005
piyush_movadiya piyush_movadiya is offline
Registered User
 
Join Date: Aug 2005
Last Activity: 1 October 2005, 2:01 PM EDT
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
i want to update my content in file.
like account holder deposite may be increase or discrease what i do?
Sponsored Links
    #6  
Old 08-12-2005
mbb mbb is offline
Registered User
 
Join Date: Aug 2001
Last Activity: 25 October 2010, 3:31 AM EDT
Location: UK
Posts: 104
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Sponsored Links
    #7  
Old 08-12-2005
Kelam_Magnus's Avatar
Kelam_Magnus Kelam_Magnus is offline Forum Advisor  
Registered User
 
Join Date: Aug 2001
Last Activity: 18 April 2013, 3:03 PM EDT
Location: San Antonio, TX,
Posts: 1,070
Thanks: 0
Thanked 4 Times in 4 Posts
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.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to update a .csv file? 4dirk1 Shell Programming and Scripting 1 12-02-2010 04:11 AM
rsync - update file on backup when file renamed on source coolatt Shell Programming and Scripting 2 02-08-2010 07:10 AM
update a file with values from other file in shell bash teodora Shell Programming and Scripting 1 07-03-2008 11:39 AM
update a file by key ynixon Shell Programming and Scripting 25 03-29-2007 09:09 AM



All times are GMT -4. The time now is 07:50 AM.