Sponsored Content
Top Forums UNIX for Dummies Questions & Answers #$ -cwd #what does this mean? Post 302548481 by rebazon on Thursday 18th of August 2011 01:30:40 PM
Old 08-18-2011
#$ -cwd #what does this mean?

When I want to specify the current working directory (-cwd) why do I need a # followed by a $? What does the combo of #$ do? Thanks.
 

4 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

cwd

Hello ! How can I see my current working directory on the bar of my "dtterm" window (I use CDE). any ideas ? thnx, GISMO (1 Reply)
Discussion started by: Gismo
1 Replies

2. UNIX for Dummies Questions & Answers

CWD as Prompt

I need a one line command called cd (must also still function as cd) and will allow the prompt to change to the cwd. All I can figure out is to change the .cshrc but there must be an easier way in a one line command no? (1 Reply)
Discussion started by: petter_uk
1 Replies

3. UNIX for Dummies Questions & Answers

implemenation of cwd()

i'm writing my own shell and implementing a few unix commands. I'm using the readline() for input and strtk() to tokenize it. I need to implement the cwd command as an option in the shell.. Here's the layout : while true do Read a line of input using readline() tokenize the input switch... (1 Reply)
Discussion started by: noobie
1 Replies

4. Shell Programming and Scripting

CWD in prompt only showing the directory when set

Hi Gurus, I am working in tcsh and i set the prompt with this. set prompt = "$cwd>" But I see teh prompt only gets reflected with the directory where I set the prompt. After i cd to another directory it still shows the old directory. Please advise (1 Reply)
Discussion started by: kinny
1 Replies
getcwd(3C)																getcwd(3C)

NAME
getcwd() - get pathname of current working directory SYNOPSIS
DESCRIPTION
The function places the absolute pathname of the current working directory in the array pointed to by buf, and returns buf. The value of size must be at least one greater than the length of the pathname to be returned. If buf is a NULL pointer, obtains size bytes of space using (see malloc(3C)). In this case, the pointer returned by can be used as the argument in a subsequent call to (see malloc(3C)). Invoking with buf as a null pointer is not recommended because this functionality may be removed from the HP-UX operating system in a future release. RETURN VALUE
Upon successful completion, returns a pointer to the current directory pathname. Otherwise, it returns NULL with set if size is not large enough, or if an error occurs in a lower-level function. ERRORS
fails if any of the following conditions are encountered: The size argument is zero. The size argument is greater than zero, but is smaller than the length of the pathname. The length of the specified pathname exceeds bytes, or the length of a component of the pathname exceeds bytes while is in effect. may fail if any of the following conditions are encountered: Read or search permission is denied for a component of pathname. buf points outside the allocated address space of the process. may not always detect this error. failed to provide size bytes of memory. EXAMPLES
#include <unistd.h> #include <limits.h> char *cwd; char buf[PATH_MAX+1]; ... if ((cwd = getcwd(buf, PATH_MAX+1)) == NULL) { perror("pwd"); exit(1); } puts(cwd); AUTHOR
was developed by AT&T. SEE ALSO
pwd(1), malloc(3C), thread_safety(5). STANDARDS CONFORMANCE
getcwd(3C)
All times are GMT -4. The time now is 12:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy