The UNIX and Linux Forums  

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 here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
passing variable from bash to perl from bash script arsidh Shell Programming and Scripting 10 06-04-2008 09:25 AM
[bash] Check if variable is set or blank noratx Shell Programming and Scripting 1 03-28-2008 06:42 AM
Urgent!! Bash - problem using CD with variable jacksam007 Shell Programming and Scripting 1 01-17-2007 08:10 PM
bash env variable containing @ Yogesh Sawant Shell Programming and Scripting 4 12-20-2006 03:51 AM
Using variable with cp command in bash shell maheshsri Shell Programming and Scripting 4 12-04-2006 10:30 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 04-23-2008
Registered User
 

Join Date: Apr 2008
Location: Philippines
Posts: 3
BASH -- sed -- variable

Hi, I'm new at bash scripting -- can anyone here help me about the sed command?

I need to be able to edit and or delete a text from an outside file ie file.txt -- I'm passing a variable and not a string

I was thinking of something like

echo -n "What do you want to edit?: "
read edit
sed -e '$edit' file.txt

??? thanks in advance!!!
Reply With Quote
Forum Sponsor
  #2  
Old 04-23-2008
Registered User
 

Join Date: Dec 2005
Posts: 74
I do have a suggestion for you, dont take it offensive,please use goggle for getting a generic idea about things and ask in forums for specific things.if the command or tool belongs to linux or gnu it will be available in gnu docs or how to linux etc.

people over here would be ready to help you.
->read the rules and faq(it will be really effective in improving you technically and personally)
->try to google if you dont have any idea about the subject
->then search in forum
->then ask question

this time i would give a link for you question
Gentoo Linux Documentation -- Sed by example, Part 1


Best Regards,
Rakesh UV
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 12:20 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0