Sponsored Content
Top Forums Shell Programming and Scripting Find a file and set path in variable? Post 302985372 by Corona688 on Tuesday 8th of November 2016 02:42:33 PM
Old 11-08-2016
Please explain in more detail what this does.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Set Path variable in c shell

I set my path environment variable in c shell, using the syntax below setenv PATH "${PATH}:/usr/local:/usr/local/bin" and placed this in $HOME/.login $HOME/.cshrc and /etc/.login /etc/.cshrc but when I issued echo $PATH or set command the output does not reflect changes made to... (5 Replies)
Discussion started by: hassan2
5 Replies

2. UNIX for Advanced & Expert Users

How does the PATH and MANPATH environment variable get set?

Hi, How does the PATH and MANPATH environment variable get set? I want to add "/opt/SUNWspro/bin" to the search path for all the users. Where can I access this variable. I know in my home directory, depend on which shell I use, there are files such as .profile and .cshrc which I can edit to... (3 Replies)
Discussion started by: vtran4270
3 Replies

3. UNIX for Dummies Questions & Answers

set variable PATH

Hi, i know that this topic discussed for many times but although i had researched them i couldnt succeed in my problem. i am following a step-by-step instruction guide and must do the following: ------------- To ensure access, set the path PATH $ORACLE_HOME/perl/bin:$PATH and set the Perl... (2 Replies)
Discussion started by: merope
2 Replies

4. AIX

How to set path for the EDITOR variable?

For some reason something has changing in my AIX environment where when I type: ACLEDIT filename ...I get: 3002-104 acledit: EDITOR environment variable must be full pathname I know I need to reset the EDITOR variables path to /usr/bin/vi but I can't remember the syntax anyone? (2 Replies)
Discussion started by: heprox
2 Replies

5. UNIX for Dummies Questions & Answers

PATH variable set incorrectly?

I've noted that in order to use commands like ifconfig, I have to prefix the commands with the directory. /etc/profile shows that the paths should be part of the PATH environment variable; any idea where the bug is? :confused: # /etc/profile # System wide environment and startup... (1 Reply)
Discussion started by: jon80
1 Replies

6. UNIX for Dummies Questions & Answers

PATH set but I can't find where!!!!

Hi, Can anybody help with this? When I log into my user account on my box via ssh and then instantly perform an env command I see that my path has been set as follows: PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin My user account uses the ksh shell. In my home directory there is no... (7 Replies)
Discussion started by: Donkey25
7 Replies

7. Shell Programming and Scripting

Find and replace string from file which contains variable and path - SH

e.g. /home/$USER/.config replace it with "" (empty) Is this possible? I think you should play a bit with sharps ## and sed:b: (2 Replies)
Discussion started by: hakermania
2 Replies

8. Shell Programming and Scripting

Unable to set my PATH variable

Hello All, Hope you can understand my problem from the below code. $ cat ~/.profile PS1=`whoami`@`hostname`':$PWD $ ' export PATH="$PATH:.:/logarchive/utility/util:/usr/sbin:" $ echo $PATH /usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:.:/usr/sbin: $ echo $SHELL /usr/bin/ksh ... (6 Replies)
Discussion started by: sathyaonnuix
6 Replies

9. Shell Programming and Scripting

Parse output path to set variable

I am looking to parse a text file output and set variables based on what is cropped from the parsing. Below is my script I am looking to add this feature too. All it does is scan a certain area of users directories for anyone using up more than X amount of disk space. It then writes to the... (4 Replies)
Discussion started by: es760
4 Replies

10. Shell Programming and Scripting

Set variable to path that does not exist on local host

Can anyone suggest a workaround zone_5.org='/qaz/qwe/path/tns.osn' output /home/bingo/XXX_script.sh: line 180: zone_5.org=/qaz/qwe/path/tns.osn: no parent The path does not exist on the local machine, the allocation used to work till the server was upgraded. Red Hat Enterprise Linux... (2 Replies)
Discussion started by: squrcles
2 Replies
explain_opendir(3)					     Library Functions Manual						explain_opendir(3)

NAME
explain_opendir - explain opendir(3) errors SYNOPSIS
const char *explain_opendir(const char *pathname); const char *explain_errno_opendir(int errnum, const char *pathname); int errnum, const char *pathname); void explain_message_opendir(char *message, int message_size, void explain_message_errno_opendir(char *message, int message_size, const char *pathname); DESCRIPTION
These functions may be used to explain opendir(3) errors. explain_opendir const char *explain_opendir(const char *pathname); The explain_opendir function is used to obtain an explanation of an error returned by the opendir(3) function. The least the message will contain is the value of strerror(errno), but usually it will do much better, and indicate the underlying cause in more detail. The errno global variable will be used to obtain the error value to be decoded. This function is intended to be used in a fashion similar to the following example: DIR *dp = opendir(pathname); if (!dp) { fprintf(stderr, "%s ", explain_opendir(pathname)); exit(EXIT_FAILURE); } pathname The original pathname, exactly as passed to the opendir(3) system call. Returns: The message explaining the error. This message buffer is shared by all libexplain functions which do not supply a buffer in their argument list. This will be overwritten by the next call to any libexplain function which shares this buffer, including other threads. Note: This function is not thread safe, because it shares a return buffer across all threads, and many other functions in this library. explain_errno_opendir const char *explain_errno_opendir(int errnum, const char *pathname); int errnum, const char *pathname); The explain_errno_opendir function is used to obtain an explanation of an error returned by the opendir(3) function. The least the message will contain is the value of strerror(errnum), but usually it will do much better, and indicate the underlying cause in more detail. This function is intended to be used in a fashion similar to the following example: DIR *dp = opendir(pathname); if (!dp) { int errnum = errno; const char *message = explain_errno_opendir(errnum, pathname); fprintf(stderr, "%s ", message); exit(EXIT_FAILURE); } errnum The error value to be decoded, usually obtained from the errno global variable just before this function is called. This is neces- sary if you need to call any code between the system call to be explained and this function, because many libc functions will alter the value of errno. pathname The original pathname, exactly as passed to the opendir(3) system call. Returns: The message explaining the error. This message buffer is shared by all libexplain functions which do not supply a buffer in their argument list. This will be overwritten by the next call to any libexplain function which shares this buffer, including other threads. Note: This function is not thread safe, because it shares a return buffer across all threads, and many other functions in this library. explain_message_opendir void explain_message_opendir(char *message, int message_size, const char *pathname); The explain_message_opendir function is used to obtain an explanation of an error returned by the opendir(3) function. The least the mes- sage will contain is the value of strerror(errno), but usually it will do much better, and indicate the underlying cause in more detail. The errno global variable will be used to obtain the error value to be decoded. This function is intended to be used in a fashion similar to the following example: DIR *dp = opendir(pathname); if (!dp) { char message[3000]; explain_message_opendir(message, sizeof(message), pathname); fprintf(stderr, "%s ", message); exit(EXIT_FAILURE); } message The location in which to store the returned message. Because a message return buffer has been supplied, this function is thread safe if the buffer is thread safe. message_size The size in bytes of the location in which to store the returned message. pathname The original pathname, exactly as passed to the opendir(3) system call. explain_message_errno_opendir void explain_message_errno_opendir(char *message, int message_size, const char *pathname); The explain_message_errno_opendir function is used to obtain an explanation of an error returned by the opendir(3) function. The least the message will contain is the value of strerror(errnum), but usually it will do much better, and indicate the underlying cause in more detail. This function is intended to be used in a fashion similar to the following example: DIR *dp = opendir(pathname); if (!dp); { int err = errno; char message[3000]; explain_message_errno_opendir(message, sizeof(message), err, pathname); fprintf(stderr, '%s ', message); exit(EXIT_FAILURE); } message The location in which to store the returned message. Because a message return buffer has been supplied, this function is thread safe if the buffer is thread safe. message_size The size in bytes of the location in which to store the returned message. errnum The error value to be decoded, usually obtained from the errno global variable just before this function is called. This is neces- sary if you need to call any code between the system call to be explained and this function, because many libc functions will alter the value of errno. pathname The original pathname, exactly as passed to the opendir(3) system call. COPYRIGHT
libexplain version 0.52 Copyright (C) 2008 Peter Miller AUTHOR
Written by Peter Miller <pmiller@opensource.org.au> explain_opendir(3)
All times are GMT -4. The time now is 07:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy