| Blogs | Classifieds | Downloads | FlashChat | Gallery | Googlemap | Invite Friends | Links | Projects | Reviews | Wiki |
| |||||||||
Welcome to the pSeries Tech Forums,
our free peer-based support site for administrators, engineers and architects working with IBM pSeries servers and software. You are currently viewing our site as a guest which gives you limited access to view most discussions, articles, tutorials and access our other free features. By joining our community you will be able to collaborate with administrators, engineers and architects charged with designing, delivering or maintaining IBM pSeries server environments. Founded by a recognized IBM pSeries consultant and IBM Redbook author, pSeries Tech Forums was developed with the single mission of bringing IBM pSeries professionals together into a single self-help community. Registration is fast, simple and absolutely free to all IT professionals with responsibility for or interest in IBM pSeries servers. We invite you to join our community today! If you have any problems with the registration process or your account login, please contact contact support. |
| Our Sponsors | |
| | |
| Want to advertise? | |
![]() |
| | LinkBack | Thread Tools |
|
#1
| ||||
| ||||
Hi I have a LPAR running shell scripts using sed command to make some convertions in datafiles. When those programs run, performance at CPU level goes down almost at 100% user. I'm not such a expert in sed so i need your help in order to improve those programs. Following one sample of those sed sentences: cat encabezado.tx $1 |sed "s/\| /\|/g" | sed "s/,/./g" > $1_ok The program above looks for every blank space after the pipe character and change it by no space at all, then changes comma character by dot. But i think this can be improved. I think instead of having sed to change the blank spaces and then replacing commas, all these tasks can be exec at the same time. Any help please.
__________________ cd3lgad0p |
|
#2
| ||||
| ||||
My sed is crud also, I prefer to use perl .. and, this can also probably be improved into one substitution instead of seperating 2 subs with a ";" because my perl is not that good either, but htis works ok. perl -pe "s/\| /\|/g;s/,/./g" your_text_file_name.txt HTH Mark Taylor |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |