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
please help immediately infyanurag Linux 4 11-02-2007 10:06 AM
I need help immediately. Please help me Sheethal UNIX for Dummies Questions & Answers 4 07-26-2007 06:11 AM
UIDs being overwritten immediately xsys2000 AIX 2 05-08-2007 01:00 PM
Volcheck does not respond nikk UNIX for Advanced & Expert Users 2 01-10-2005 05:08 AM
Need a Shell Program immediately praji Shell Programming and Scripting 4 01-22-2002 04:09 PM

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-30-2007
deepti.1104 deepti.1104 is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 2
Please respond immediately

Hi ..please tell me how to modinfy an existing file in a directory, i need commands like to open edit and save n execute the file in BASH. please respond immediately
  #2 (permalink)  
Old 08-30-2007
ahmedwaseem2000 ahmedwaseem2000 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Bangalore
Posts: 219
Please post exactly what you are looking for??????????
  #3 (permalink)  
Old 08-30-2007
deepti.1104 deepti.1104 is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 2
I have a file say x and i need to update with some values in it, and check te output. I need the commands to edit the file, save the file , run the file and how to insert the text and delete the text in the file in bash(bourne shell). Please give me these commands. that shud help me.

thanks
  #4 (permalink)  
Old 08-31-2007
namishtiwari namishtiwari is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2007
Location: Bangalore
Posts: 377
Quote:
Originally Posted by deepti.1104 View Post
I have a file say x and i need to update with some values in it, and check te output. I need the commands to edit the file, save the file , run the file and how to insert the text and delete the text in the file in bash(bourne shell). Please give me these commands. that shud help me.

thanks
Deepti,here are the commands that can help you..
file name is x--

1.. vi x --> file is open in commad mode.
2.. for navigation in vi use these commands-
a. h->to move left
b. j->to move down
c. k-> to move up
d. l-> to go right

3.. To write something in vi you have to press i or a to put u in insert mode or append mode.write something in file.

4.. press x to delete a word,dd to delete a line,r to replace a word.
5.. see man vi ->there are so m any commands to do editing and navigation.
6.. To save press escape :wq ->it will save and exit.
escape :w ->only save
escape :q quit
escape :q! ->quit without save.

Thanks,
Namish
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:33 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