05-22-2005
If you have a filehandle which you previously open()ed for writing, you can print() to it.
9 More Discussions You Might Find Interesting
1. Solaris
Hi
I am getting the uptime output as follows
12:40am up 4 day(s), 18:29, 2 users, load average: 38.97, 36.54, 34.89
The load average is too high .
I have checked the processes , but no process is taking too much cpu time
Please help (3 Replies)
Discussion started by: guy009
3 Replies
2. Shell Programming and Scripting
Hi All,
I have a got a problem ..
I have t files as below:
1.txt contains
-----
-----
-----
column 1, "cat",
column 24, "dog",
column 100, "rat",
-----
-----
-----
2.sh should contain
-----
-----
-----
awk 'BEGIN { printf ("%1s","cat")}' (19 Replies)
Discussion started by: jisha
19 Replies
3. Shell Programming and Scripting
Hi,
I got a list of file that all got the same standard format.
Can anyone teach me how to put the space in all of them?!
Input file:
>nucleotide1
AAAAAAAAACCCGGG
>nucleotide2
GGGGGGCCCCCTTTTA
>nucleotide3
GGTACACCACACTCAC
>nucleotide4
TTTGGAGAGAGACCCC
desired output:... (4 Replies)
Discussion started by: patrick87
4 Replies
4. Solaris
i am using this way to create zone1 and zone2
bash-2.05b# zonecfg -z zone1
zone1: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:zone1> create
zonecfg:zone1> set zonepath=/zone/1
zonecfg:zone1> set autoboot=true
zonecfg:zone1> add net
zonecfg:zone1:net>... (6 Replies)
Discussion started by: coxmanchester
6 Replies
5. Linux
Hi,
I am facing problem while accessing samba share on Linux 5.1 from windows, though I have done the same configuration on Linux 4 (Update 2), on Red Hat 4.0 it is working but while on Linux 5.1 these configuration are not working, I have disabled the firewall also.
Kindly suggest me... (1 Reply)
Discussion started by: manoj.solaris
1 Replies
6. Shell Programming and Scripting
can u plz tell me where is the error
echo enter the filename to be searched
read fname
if #-d $fname
then
echo file exists
if
then
echo itsa directory
elif
then
echo its readable
cat $fname
else
echo its not readable
fi
else
... (1 Reply)
Discussion started by: gotam
1 Replies
7. Shell Programming and Scripting
source file is located in (elk.some.com)
/export/elk2/vp141p/Somedir/dist/current/Filename.ear
destination machine(191.hydc.xxx.com)
/export/home/vp141p/ARCHIVE
scp -p vp141p@hstst191.hydc.sbc.com:/export/elk2/vp141p/PM_Build_SBS/Build_PVT_SBS/dist/current/Filename.ear .
The above code is... (5 Replies)
Discussion started by: vishwakar
5 Replies
8. Shell Programming and Scripting
Dear Brothers!
Need your help for the case where I am running one command on prompt and its giving us the correct output, but when i use the same command from shell its directs no output.:wall:
the command on command prompt is
ls -ltrh * | nawk '{if ($5~ '/$'M'/') print $9}' | grep -v... (1 Reply)
Discussion started by: jojo123
1 Replies
9. AIX
Hi,
I am able to login using su - or su directly ,
# prompt is coming, it doesnt ask for password.
any normal user on aix system is login using su - or su .
Please suggest where to change the configuration
direct root login is disabled in /etc/ssh/sshd_config file. (0 Replies)
Discussion started by: manoj.solaris
0 Replies
LEARN ABOUT MOJAVE
filecache
FileCache(3pm) Perl Programmers Reference Guide FileCache(3pm)
NAME
FileCache - keep more files open than the system permits
SYNOPSIS
no strict 'refs';
use FileCache;
# or
use FileCache maxopen => 16;
cacheout $mode, $path;
# or
cacheout $path;
print $path @data;
$fh = cacheout $mode, $path;
# or
$fh = cacheout $path;
print $fh @data;
DESCRIPTION
The "cacheout" function will make sure that there's a filehandle open for reading or writing available as the pathname you give it. It
automatically closes and re-opens files if you exceed your system's maximum number of file descriptors, or the suggested maximum maxopen.
cacheout EXPR
The 1-argument form of cacheout will open a file for writing ('>') on it's first use, and appending ('>>') thereafter.
Returns EXPR on success for convenience. You may neglect the return value and manipulate EXPR as the filehandle directly if you prefer.
cacheout MODE, EXPR
The 2-argument form of cacheout will use the supplied mode for the initial and subsequent openings. Most valid modes for 3-argument
"open" are supported namely; '>', '+>', '<', '<+', '>>', '|-' and '-|'
To pass supplemental arguments to a program opened with '|-' or '-|' append them to the command string as you would system EXPR.
Returns EXPR on success for convenience. You may neglect the return value and manipulate EXPR as the filehandle directly if you prefer.
CAVEATS
While it is permissible to "close" a FileCache managed file, do not do so if you are calling "FileCache::cacheout" from a package other
than which it was imported, or with another module which overrides "close". If you must, use "FileCache::cacheout_close".
Although FileCache can be used with piped opens ('-|' or '|-') doing so is strongly discouraged. If FileCache finds it necessary to close
and then reopen a pipe, the command at the far end of the pipe will be reexecuted - the results of performing IO on FileCache'd pipes is
unlikely to be what you expect. The ability to use FileCache on pipes may be removed in a future release.
FileCache does not store the current file offset if it finds it necessary to close a file. When the file is reopened, the offset will be
as specified by the original "open" file mode. This could be construed to be a bug.
The module functionality relies on symbolic references, so things will break under 'use strict' unless 'no strict "refs"' is also
specified.
BUGS
sys/param.h lies with its "NOFILE" define on some systems, so you may have to set maxopen yourself.
perl v5.18.2 2014-01-06 FileCache(3pm)