![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| gcd.sh script doesn't work... | kantze | Shell Programming and Scripting | 1 | 01-17-2008 09:46 PM |
| Modify Perl script to work with txt - Permissions script | joangopan | Shell Programming and Scripting | 1 | 09-12-2007 11:38 PM |
| My script does not work - could you pls help? | BearCheese | Shell Programming and Scripting | 1 | 06-29-2007 05:12 AM |
| Why does this script not work? Please help | duke0001 | Shell Programming and Scripting | 4 | 02-22-2007 09:28 PM |
| Script doesn't work, but commands inside work | cheongww | UNIX for Dummies Questions & Answers | 2 | 11-14-2006 10:52 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
sed script. How does it work?
I'm using this command
sed -e "s/'/'/g" -e 's/"/"/g' -e 's/&/\&/g' myfile.txt My question is does this command reads file 3 times applying different replacement each time or it reads it only once and do 3 replacements at the same time? My concern is, since I have big files (1 MB or more) that if its' first case - it will be very slow as list of different replacements grow. Have 3 now but can have 15 in a future!? Now it takes 45 minutes for 1mb file. Thank you |
|
||||
|
Thanks, this explains it :
$ man sed ----- A script consists of editing commands, one per line, of the following form: [address[,address]]function[arguments ] In normal operation, sed cyclically copies a line of input into a pattern space (unless there is something left after a D command), applies in sequence all commands whose addresses select that pattern space, and at the end of the script copies the pattern space to the standard output (except under -n) and deletes the pattern space. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|