Sponsored Content
Full Discussion: open cmd
Top Forums Programming open cmd Post 96279 by bankpro on Thursday 19th of January 2006 03:12:24 AM
Old 01-19-2006
open cmd

if((LogFile=open(TempStr,O_CREAT|O_WRONLY|O_APPEND,0666))==-1)
return(1);



could someone explain me what the open() does here
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

man <cmd> >> cmd.txt

I've noticed most of my postings here are because of syntax errors. So I want to begin compiling a large txt file that contains all the "man <cmd>" of the commands I most have problems with. I ran a "man nawk >> nawk.txt" but it included a header/footer on each "page". Anyone know how I'd be... (6 Replies)
Discussion started by: yongho
6 Replies

2. Shell Programming and Scripting

open terminal to run cmd using shell script

i want the shell script to open the terminal and in that terminal i want to run a command specified in the script... how can it be done... (2 Replies)
Discussion started by: chandrabhushan
2 Replies

3. Red Hat

cannot set user id: Resource temporarily unavailable (not open file/open process related)

First post, sorry to be a bother but this one has been dogging me. I have a process user (java application server) that trips a resource limit every couple weeks and need help finding what limit we're hitting. First, this is what's running: This is the error when jobs are run or the... (0 Replies)
Discussion started by: Katahdin
0 Replies

4. Shell Programming and Scripting

Unix cmd prompt how to get old cmd run?

Hi, I am using SunOS I want to serch my previous command from unix prompt (like on AIX we can search by ESC -k) how to get in SunOs urgent help require. (10 Replies)
Discussion started by: RahulJoshi
10 Replies

5. Windows & DOS: Issues & Discussions

script to open new cmd prompt for devices on visio

Hello, Can any one please help: I have a lab design on Visio, with routers and switches. What I am planning to do is: when I double click a device icon - it should open a new cmd prompt window and automatically performs the telnet session and log's me into the device. Appreciate your... (0 Replies)
Discussion started by: sureshcisco
0 Replies

6. Shell Programming and Scripting

Use Unix shell script to open Windows command prompt (cmd)

Hello, I work on Windows and I use Putty to access a remote UNIX server. I am trying to build a shell script that will have as main task to open the Windows command prompt (cmd) and run some Windows commands thereafter. The commands are actually file transfer commands that will download a file... (14 Replies)
Discussion started by: rookie2785
14 Replies

7. Shell Programming and Scripting

Perl open(CMD, "cmd |"); buffering problem..

Hello, There's a third-party application's command that shows the application's status like "tail -f verybusy.log". When use the command, the output comes every 1-sec. but when it goes in a script below the output comes every 8-sec...What is the problem and how can I fix it? open(CMD,... (2 Replies)
Discussion started by: Shawn, Lee
2 Replies
SDBM_File(3pm)						 Perl Programmers Reference Guide					    SDBM_File(3pm)

NAME
SDBM_File - Tied access to sdbm files SYNOPSIS
use Fcntl; # For O_RDWR, O_CREAT, etc. use SDBM_File; tie(%h, 'SDBM_File', 'filename', O_RDWR|O_CREAT, 0666) or die "Couldn't tie SDBM file 'filename': $!; aborting"; # Now read and change the hash $h{newkey} = newvalue; print $h{oldkey}; ... untie %h; DESCRIPTION
"SDBM_File" establishes a connection between a Perl hash variable and a file in SDBM_File format;. You can manipulate the data in the file just as if it were in a Perl hash, but when your program exits, the data will remain in the file, to be used the next time your program runs. Use "SDBM_File" with the Perl built-in "tie" function to establish the connection between the variable and the file. The arguments to "tie" should be: 1. The hash variable you want to tie. 2. The string "SDBM_File". (Ths tells Perl to use the "SDBM_File" package to perform the functions of the hash.) 3. The name of the file you want to tie to the hash. 4. Flags. Use one of: "O_RDONLY" Read-only access to the data in the file. "O_WRONLY" Write-only access to the data in the file. "O_RDWR" Both read and write access. If you want to create the file if it does not exist, add "O_CREAT" to any of these, as in the example. If you omit "O_CREAT" and the file does not already exist, the "tie" call will fail. 5. The default permissions to use if a new file is created. The actual permissions will be modified by the user's umask, so you should probably use 0666 here. (See "umask" in perlfunc.) DIAGNOSTICS
On failure, the "tie" call returns an undefined value and probably sets $! to contain the reason the file could not be tied. "sdbm store returned -1, errno 22, key "..." at ..." This warning is emitted when you try to store a key or a value that is too long. It means that the change was not recorded in the database. See BUGS AND WARNINGS below. BUGS AND WARNINGS
There are a number of limits on the size of the data that you can store in the SDBM file. The most important is that the length of a key, plus the length of its associated value, may not exceed 1008 bytes. See "tie" in perlfunc, perldbmfilter, Fcntl perl v5.18.2 2014-01-06 SDBM_File(3pm)
All times are GMT -4. The time now is 04:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy