Thanks for the valuable prompt replies.
Is it possible to search and replace each string with some prefix using awk?
For e.g.:
\X<7> with ".\X<7> (X[7])",
where X could be any word in the file?
Thanks, I once again appreciate your inputs!
Hello all,
I have a text file that looks like this:
Today, tomorrow, perl,
\birds<7>, \animals<4>, awk, gawk
I wish to write it to a file in this manner
Today,
tomorrow,
perl,
\birds<7>,
\animals<4>,
awk,
gawk
I tried the following:
awk '{sub(" ", "\n", $0)}' space >...
Hi,
I am new perl user. I wish to write each word in a text file separated by spaces on to a new line.
e.g: temp.txt:
This is a nice forum
Good learning Perl
Output:
This
is
a
nice
forum
Good
learning
perl
My script:
#!/usr/intel/bin/perl
open LIST, "temp" or die...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.