Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

want detailed info regarding..

Status
Not open for further replies.

H_D_R

Full Member level 6
Full Member level 6
Joined
Jan 31, 2008
Messages
329
Helped
26
Reputation
52
Reaction score
9
Trophy points
18
Location
India
Activity points
0
hello all,...

i have read the awk, sed and grep command.
but still little bit confused where to use it in shell scripting..

can anyone please tell me about its usage and condition for using it in Shell scripting.

thanks to you all in advanced..
 

Take sed for example.

If you want to write a script to change all occurences of text "old" to "new", you can write:
Code:
#!/bin/sh
sed -e 's/old/new/g' "$1"
or
Code:
#/usr/bin/sed -f
s/old/new/g
Save the script to file "foo" and set it with executable with "chmod", then you can type
Code:
foo myfile
to change "old" to "new" in "myfile"
 

    H_D_R

    Points: 2
    Helpful Answer Positive Rating
thank you Hughes,

can you tell me one more thing..
can you please give me detail about foo bar.
i have read in lots of tutor, they are always writing it.
what is it actually???
and where and how it is linked with linux..??
 

I don't know why they like "foo", but I think it is just a word for example, just as "example", or "test1".
 

http://www.faqs.org/rfcs/rfc3092.html

Network Working Group D. Eastlake 3rd
Request for Comments: 3092 Motorola
Category: Informational C. Manros
Xerox
E. Raymond
Open Source Initiative
1 April 2001

Etymology of "Foo"

Status of this Memo

This memo provides information for the Internet community. It does
not specify an Internet standard of any kind. Distribution of this
memo is unlimited.

Copyright Notice

Copyright (C) The Internet Society (2001). All Rights Reserved.

Abstract

Approximately 212 RFCs so far, starting with RFC 269, contain the
terms `foo', `bar', or `foobar' as metasyntactic variables without
any proper explanation or definition. This document rectifies that
deficiency.

Table of Contents

1. Introduction............................................1
2. Definition and Etymology................................2
3. Acronyms................................................5
Appendix...................................................7
Security Considerations...................................11
References................................................12
Authors' Addresses........................................13
Full Copyright Statement..................................14
 

    H_D_R

    Points: 2
    Helpful Answer Positive Rating
Hughes said:
I don't know why they like "foo", but I think it is just a word for example, just as "example", or "test1".

but still i am thinking there is something other reason which we dont know...

is there anyone who knows about it....??
 

H_D_R said:
Hughes said:
I don't know why they like "foo", but I think it is just a word for example, just as "example", or "test1".

but still i am thinking there is something other reason which we dont know...

is there anyone who knows about it....??

try this article https://tinyurl.com/48x24
 

    H_D_R

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top