Need Help with sed/perl !


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need Help with sed/perl !
# 8  
Old 04-14-2011
Error

Can anyone please explain in awk/sed ? Thank you.
# 9  
Old 04-15-2011
gameboy,

can you try

Code:
cat <filename> | sed 's/[[:space:]]/g'

# 10  
Old 04-15-2011
Error

Thanks for your input. But Please read the requirement completely.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Rewrite sed to perl or run sed in perl

I am having trouble re-writing this sed code sed -nr 's/.*del(+)ins(+).*NC_0{4}(+).*g\.(+)_(+).*/\3\t\4\t\5\t\1\t\2/p' C:/Users/cmccabe/Desktop/Python27/out_position.txt > C:/Users/cmccabe/Desktop/Python27/out_parse.txt in perl Basically, what the code does is parse text from two fields... (12 Replies)
Discussion started by: cmccabe
12 Replies

2. Shell Programming and Scripting

Perl sed question

Hi, I'm trying to use perl the way I use sed. Lets say I have this command: $ echo abc | sed 's/abc/&&/' abcabcIf I try this with perl, I end up with this: $ echo abc | perl -pe 's/abc/&&/' &&How do I make the '&' sign work? Another thing that I can't get with perl is this: $ echo... (4 Replies)
Discussion started by: Subbeh
4 Replies

3. Shell Programming and Scripting

awk sed perl??

Hi guys First of all a salute to this wonderful platform which has helped me many a times. Im now faced with something that I cannot solve. I have data like this 11:14:18 0.46975 11:14:18 0.07558 11:14:18 0.00020 11:14:18 0.00120 11:14:18 0.25879 11:14:19 0.00974 11:14:19 0.05656... (13 Replies)
Discussion started by: jamie_123
13 Replies

4. Shell Programming and Scripting

re-Substitution Sed (or Perl)

I have a large text csv file that I'm working with. It will look something like this: D,",E",C O,"F,",I O,gh,R The second column always has a two digit random code (can be numbers, letters or any characters). When one of the characters happens to be a comma, the string is quoted. I want to... (5 Replies)
Discussion started by: beenny
5 Replies

5. Shell Programming and Scripting

Sed/Perl help

Some text is like this.... <table>This is first text.</table>mouse <table>This is second text</table>keyboard <table>This is third text</table>Pad I need to insert <a></a> between "mouse","keyboard","Pad". I it possible to do with sed/Perl ? Please help.. The text should look like... (8 Replies)
Discussion started by: gameboy87
8 Replies

6. Shell Programming and Scripting

Problem with sed in perl!!

Hi, I am facing an issue with sed in perl. I have a file which has 2 header lines and one trailer line. I need to process the file without these headers and trailer. My file looks like : File.txt:- Header1 Header2 data1 data2 trailer For removing header and trailer from file I am using... (5 Replies)
Discussion started by: abhisharma23
5 Replies

7. Shell Programming and Scripting

Convert sed to perl

Can anyone convert this from sed to perl: sed -n '/\var\/log/p' /etc/syslog.conf I think Ive looked at this to much....urgh.. Thanks Ben (5 Replies)
Discussion started by: bigben1220
5 Replies

8. UNIX for Advanced & Expert Users

Use of SED in Perl or any other options

Hi Folks, I am working on a data extraction script in perl.I am a begineer in perl and shell scripting. So i need your inputs to solve the script problem. I have data coming from database in the format :- <b> _ABC (Apply Changes) (p) </b> _EFG | HIJ | KLM | WER <b> _E3R (Apply Changes)... (3 Replies)
Discussion started by: subhotech
3 Replies

9. Shell Programming and Scripting

[Perl] Accessing array elements within a sed command in Perl script

I am trying to use a script to replace the header of each file, whose filename are stored within the array $test, using the sed command within a Perl script as follows: $count = 0; while ( $count < $#test ) { `sed -e 's/BIOGRF 321/BIOGRF 332/g' ${test} > 0`; `cat 0 >... (2 Replies)
Discussion started by: userix
2 Replies

10. Shell Programming and Scripting

Perl/Sed script help

Hi All, I would need to generate Oracle Inster scripts from an excel formatted spreadsheet as follows: This needs to be stripped as follows: REC 1, REC 2 etc are the separators of the records ... I beleive a pearl script can be written for this ... anything useful will be of... (8 Replies)
Discussion started by: sabyasm
8 Replies
Login or Register to Ask a Question