Sponsored Content
Top Forums Shell Programming and Scripting Explanation for interesting sed behaviour? Post 302355934 by cabrao on Thursday 24th of September 2009 06:00:58 AM
Old 09-24-2009
Code:
for file in `find . -type f -print | xargs file | grep ASCII | cut -d: -f1`; do
     perl -pi -e 's/phrase/substitute/g' $file 
done

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

any explanation for thsi shell script behaviour

hello whats the difference between excuting a shell script as a)sh myscript.sh b). ./myscript.sh i noticed that my shell script works fine when i run it as . ./myscript .sh but fails when i run it as sh myscript.sh could anybody explain why. the shell script is very simple ... (9 Replies)
Discussion started by: xiamin
9 Replies

2. Shell Programming and Scripting

sed command explanation needed

Hi, Could you please explain me the below statement -- phrase wise. sed -e :a -e '$q;N;'$cnt',$D;ba' abc.txt > xyz.txt if suppose $cnt contains value: 10 it copies last 9 lines of abc.txt to xyz.txt why it is copying last 9 rather than 10. and also what is ba and $D over there in... (4 Replies)
Discussion started by: subbukns
4 Replies

3. UNIX for Advanced & Expert Users

Strange sed behaviour

$ echo a.bc | sed -e "s/\|/\\|/g" |a|.|b|c| $ Is the behavior of the sed statement expected ? Or is this a bug in sed ? OS details Linux 2.6.9-55.0.0.0.2.ELsmp #1 SMP Wed May 2 14:59:56 PDT 2007 i686 i686 i386 GNU/Linux (8 Replies)
Discussion started by: vino
8 Replies

4. Shell Programming and Scripting

Weird sed behaviour in script

I've written a small script to replace certain words in all the the files in a directory. #!/bin/sh #Get list of files to be edited file_list=`ls -p` for i in $file_list do echo "Processing $i" alteredi=`echo "$i" | sed -e 's/\//d/'` if then if then #actual altering (2 Replies)
Discussion started by: Peetrus
2 Replies

5. Shell Programming and Scripting

A sed doubt - need explanation

Hi, The following command works fine for me, but I could not grasp the logic working behind of sed command, it's obscure to me :( :confused: echo "./20080916/core/audioex.amr" | sed "s%\(\)/%\1_%g" o/p: ./20080916_core_audioex.amr Could anyone please explain to me in detail, that how... (6 Replies)
Discussion started by: royalibrahim
6 Replies

6. Shell Programming and Scripting

strange behaviour from sed???

Hi all, I want to do a very simple thing with sed. I want to print out the line number of a disk I have defined in /etc/exports, so I do: It's all good, but here's the problem. When I define md0 in a variable, I get nothing from sed: Why is that? can anybody please help? Thanks (2 Replies)
Discussion started by: alirezan
2 Replies

7. UNIX for Dummies Questions & Answers

SED command explanation

can someone please explain the below sed command.. sed 's/\(*|\)\(.*\)/\2\1/' (6 Replies)
Discussion started by: raghu_shekar
6 Replies

8. Shell Programming and Scripting

interesting grep behaviour

I suppose that this is not actually a script question, but I noticed this while working on a bash script homework assignment and I have been impressed with the quality of posts here -- so that is why I posted it here. I have this text file named textfile: total 40 -rwxr-xr-x 1 joeblow... (2 Replies)
Discussion started by: landog
2 Replies

9. Shell Programming and Scripting

sed command explanation

Will someone give me an explanation on how the sed command below works. sed 's/.*//' Thanks! (3 Replies)
Discussion started by: scj2012
3 Replies

10. UNIX for Advanced & Expert Users

Interesting awk/Perl/sed parsing challenge

I have a log with entries like: out/target/product/imx53_smd/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/bindings/V8HTMLVideoElement.cpp : target thumb C++: libwebcore <=... (8 Replies)
Discussion started by: glev2005
8 Replies
PERLCOMMUNITY(1)					 Perl Programmers Reference Guide					  PERLCOMMUNITY(1)

NAME
perlcommunity - a brief overview of the Perl community DESCRIPTION
This document aims to provide an overview of the vast perl community, which is far too large and diverse to provide a detailed listing. If any specific niche has been forgotten, it is not meant as an insult but an omission for the sake of brevity. The Perl community is as diverse as Perl, and there is a large amount of evidence that the Perl users apply TMTOWTDI to all endeavors, not just programming. From websites, to IRC, to mailing lists, there is more than one way to get involved in the community. Where to Find the Community There is a central directory for the Perl community: <http://perl.org> maintained by the Perl Foundation (<http://www.perlfoundation.org/>), which tracks and provides services for a variety of other community sites. Mailing Lists and Newsgroups Perl runs on e-mail; there is no doubt about it. The Camel book was originally written mostly over e-mail and today Perl's development is co-ordinated through mailing lists. The largest repository of Perl mailing lists is located at <http://lists.perl.org>. Most Perl-related projects set up mailing lists for both users and contributors. If you don't see a certain project listed at <http://lists.perl.org>, check the particular website for that project. Most mailing lists are archived at <http://nntp.perl.org/>. There are also plenty of Perl related newsgroups located under "comp.lang.perl.*". IRC The Perl community has a rather large IRC presence. For starters, it has its own IRC network, <irc://irc.perl.org>. General (not help- oriented) chat can be found at <irc://irc.perl.org/#perl>. Many other more specific chats are also hosted on the network. Information about irc.perl.org is located on the network's website: <http://www.irc.perl.org>. For a more help-oriented #perl, check out <irc://irc.freenode.net/#perl>. Perl 6 development also has a presence in <irc://irc.freenode.net/#perl6>. Most Perl-related channels will be kind enough to point you in the right direction if you ask nicely. Any large IRC network (Dalnet, EFnet) is also likely to have a #perl channel, with varying activity levels. Websites Perl websites come in a variety of forms, but they fit into two large categories: forums and news websites. There are many Perl-related websites, so only a few of the community's largest are mentioned here. News sites <http://perl.com/> Run by O'Reilly Media (the publisher of the Camel Book, among other Perl-related literature), perl.com provides current Perl news, articles, and resources for Perl developers as well as a directory of other useful websites. <http://use.perl.org/> use Perl; provides a slashdot-style Perl news website covering all things Perl, from minutes of the meetings of the Perl 6 Design team to conference announcements with (ir)relevant discussion. Forums <http://www.perlmonks.org/> PerlMonks is one of the largest Perl forums, and describes itself as "A place for individuals to polish, improve, and showcase their Perl skills." and "A community which allows everyone to grow and learn from each other." User Groups Many cities around the world have local Perl Mongers chapters. A Perl Mongers chapter is a local user group which typically holds regular in-person meetings, both social and technical; helps organize local conferences, workshops, and hackathons; and provides a mailing list or other continual contact method for its members to keep in touch. To find your local Perl Mongers (or PM as they're commonly abbreviated) group check the international Perl Mongers directory at <http://www.pm.org/>. Workshops Perl workshops are, as the name might suggest, workshops where Perl is taught in a variety of ways. At the workshops, subjects range from a beginner's introduction (such as the Pittsburgh Perl Workshop's "Zero To Perl") to much more advanced subjects. There are several great resources for locating workshops: the websites mentioned above, the calendar mentioned below, and the YAPC Europe website, <http://www.yapceurope.org/>, which is probably the best resource for European Perl events. Hackathons Hackathons are a very different kind of gathering where Perl hackers gather to do just that, hack nonstop for an extended (several day) period on a specific project or projects. Information about hackathons can be located in the same place as information about workshops as well as in <irc://irc.perl.org/#perl>. If you have never been to a hackathon, here are a few basic things you need to know before attending: have a working laptop and know how to use it; check out the involved projects beforehand; have the necessary version control client; and bring backup equipment (an extra LAN cable, additional power strips, etc.) because someone will forget. Conventions Perl has two major annual conventions: The Perl Conference (now part of OSCON), put on by O'Reilly, and Yet Another Perl Conference or YAPC (pronounced yap-see), which is localized into several regional YAPCs (North America, Europe, Asia) in a stunning grassroots display by the Perl community. For more information about either conference, check out their respective web pages: OSCON <http://conferences.oreillynet.com/>; YAPC <http://www.yapc.org>. A relatively new conference franchise with a large Perl portion is the Open Source Developers Conference or OSDC. First held in Australia it has recently also spread to Israel and France. More information can be found at: <http://www.osdc.com.au/> for Australia, <http://www.osdc.org.il> for Israel, and <http://www.osdc.fr/> for France. Calendar of Perl Events The Perl Review, <http://www.theperlreview.com> maintains a website and Google calendar (<http://www.theperlreview.com/community_calendar>) for tracking workshops, hackathons, Perl Mongers meetings, and other events. Views of this calendar are at <http://www.perl.org/events.html> and <http://www.yapc.org>. Not every event or Perl Mongers group is on that calendar, so don't lose heart if you don't see yours posted. To have your event or group listed, contact brian d foy (brian@theperlreview.com). AUTHOR
Edgar "Trizor" Bering <trizor@gmail.com> perl v5.16.2 2012-10-11 PERLCOMMUNITY(1)
All times are GMT -4. The time now is 04:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy