There is a service that runs that we call multi-streaming that calls a shell script multiple times simultaneously. In this shell script is the following line:
tr '\r' '\n' < $POLLFILE.OUT | sed '/0000000000000016000A/d' > $POLLFILE
When I run this manually it produces the desired results, but... (6 Replies)
how to use sed command to find and replace a directory
i have a file.. which contains lot of paths ...
for eg.. file contains..
/usr/kk/rr/12345/1
/usr/kk/rr/12345/2
/usr/kk/rr/12345/3
/usr/kk/rr/12345/4
/usr/kk/rr/12345/5
/usr/kk/rr/12345/6
/usr/kk/rr/12345/7... (1 Reply)
Hi Everyone
i have a perl file below, one of the line is convert the pcho time to human readable format.
$value=`awk 'BEGIN{print strftime("%c",1273236600)}' | tr -d '\n'`;
if image, if i have lots of pcho time value in a file, if i use this awk, strftime, then tr -d to remove the \n,... (2 Replies)
Hi
I have a problem when i use awk or sed to replace characters in file.
For example when I want to replace line like this :
00000O120100512 1.70 1.59 0.00 +7.280
I want to get a new line :
0000000O120100512 1.70 1.59 13.56 +7.280
In ksh :
awk... (1 Reply)
Hi
I know sed and awk has options to give range of line numbers, but
I need to replace pattern in specific lines
Something like
sed -e '1s,14s,26s/pattern/new pattern/' file name
Can somebody help me in this....
I am fine with see/awk/perl
Thank you in advance (9 Replies)
Hi,
Need a help to replace a word if a pattern is found between the delimiters preferably using SED or AWK.
below is the sample file that iam dealing with, need to match pattern 'application' if found replace the whole word between the delimiters and also print the lines that don't match.... (1 Reply)
Discussion started by: tech_frk
1 Replies
LEARN ABOUT OSX
file::dosglob
File::DosGlob(3pm) Perl Programmers Reference Guide File::DosGlob(3pm)NAME
File::DosGlob - DOS like globbing and then some
SYNOPSIS
require 5.004;
# override CORE::glob in current package
use File::DosGlob 'glob';
# override CORE::glob in ALL packages (use with extreme caution!)
use File::DosGlob 'GLOBAL_glob';
@perlfiles = glob "..\pe?l/*.p?";
print <..\pe?l/*.p?>;
# from the command line (overrides only in main::)
> perl -MFile::DosGlob=glob -e "print <../pe*/*p?>"
DESCRIPTION
A module that implements DOS-like globbing with a few enhancements. It is largely compatible with perlglob.exe (the M$ setargv.obj
version) in all but one respect--it understands wildcards in directory components.
For example, "<..\l*b\file/*glob.p?"> will work as expected (in that it will find something like '..libFile/DosGlob.pm' alright). Note
that all path components are case-insensitive, and that backslashes and forward slashes are both accepted, and preserved. You may have to
double the backslashes if you are putting them in literally, due to double-quotish parsing of the pattern by perl.
Spaces in the argument delimit distinct patterns, so "glob('*.exe *.dll')" globs all filenames that end in ".exe" or ".dll". If you want
to put in literal spaces in the glob pattern, you can escape them with either double quotes, or backslashes. e.g. "glob('c:/"Program
Files"/*/*.dll')", or "glob('c:/Program Files/*/*.dll')". The argument is tokenized using "Text::ParseWords::parse_line()", so see
Text::ParseWords for details of the quoting rules used.
Extending it to csh patterns is left as an exercise to the reader.
EXPORTS (by request only)
glob()
BUGS
Should probably be built into the core, and needs to stop pandering to DOS habits. Needs a dose of optimizium too.
AUTHOR
Gurusamy Sarathy <gsar@activestate.com>
HISTORY
o Support for globally overriding glob() (GSAR 3-JUN-98)
o Scalar context, independent iterator context fixes (GSAR 15-SEP-97)
o A few dir-vs-file optimizations result in glob importation being 10 times faster than using perlglob.exe, and using perlglob.bat is
only twice as slow as perlglob.exe (GSAR 28-MAY-97)
o Several cleanups prompted by lack of compatible perlglob.exe under Borland (GSAR 27-MAY-97)
o Initial version (GSAR 20-FEB-97)
SEE ALSO
perl
perlglob.bat
Text::ParseWords
perl v5.16.2 2012-10-25 File::DosGlob(3pm)