Sponsored Content
Operating Systems Linux How to create file on Linux using environment variable in the dirpath Post 302252036 by patricia1of5 on Tuesday 28th of October 2008 04:19:10 PM
Old 10-28-2008
Thanks

Jim,

Yes, I'd thought about System.getevn, but I was expecting to find a way to let the OS do whatever OS-specific translation was appropriate in the directory path on file creation. It's looking like that doesn't fly - maybe a shell is required to get env var translation . . . Well, I switched to using System.getenv to get the env var value and appending the rest of the directory path and that works. Thanks for taking the time to help out,

Patricia1of5
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

create a new environment variable??

Hi, I have say two programs File1: echo Enter A's Value read A export A File2: while do echo $A sleep 5 done (1 Reply)
Discussion started by: pbsrinivas
1 Replies

2. IP Networking

regarding tracking file updates on linux networking environment

could anyone Explain me with how the linux o/s keeps track of file updates in network environment? for example, assume that more than one computer is connected to network (with linux in all of them). if an user say 'X' logged into terminal 1 and created a file with the name of 'temp.txt'. The... (1 Reply)
Discussion started by: pjchoudary
1 Replies

3. Filesystems, Disks and Memory

regarding tracking file updates on linux networking environment

could anyone Explain me with how the linux o/s keeps track of file updates in network environment? for example, assume that more than one computer is connected to network (with linux in all of them). if an user say 'X' logged into terminal 1 and created a file with the name of 'temp.txt'. The... (1 Reply)
Discussion started by: pjchoudary
1 Replies

4. Shell Programming and Scripting

Setting Environment variable from value in file

I've searched Google and now this forum. Best guess is my search fu is not good (and it probably isn't). The Google search did bring me here. Background I have a number of Korn Shell scripts who all use one of 3 values for an environment variable used in the backup system. On occasion one or... (8 Replies)
Discussion started by: WolfBrother
8 Replies

5. Shell Programming and Scripting

Set Environment variable from another file

Hi, i have the following env variable. currently i am exporting variable in the same script file. but i need this is in a text file and the scripts need to export this variable from the text file. can you please suggest me. is it possible. export... (6 Replies)
Discussion started by: rsivasan
6 Replies

6. Shell Programming and Scripting

Expand an environment variable in sed, when the variable contains a slash

I'm trying to make a sed substitution where the substitution pattern is an environment variable to be expanded, but the variable contains a "slash". sed -e 's/<HOME_DIRECTORY>/'$HOME'/'This gives me the following error: sed: -e expression #1, char 21: unknown option to `s'Obviously this is... (2 Replies)
Discussion started by: Ilja
2 Replies

7. UNIX for Dummies Questions & Answers

setting a environment variable on linux

I want to set a enviroment variable VDC_DIR to a particular directory. I am doing it as export VDC_DIR=/abc it gets set but when i logout and do relogin than its not there. one way could be setting it in .profile file. but i have seen it on another box where it is not present in... (2 Replies)
Discussion started by: Jcpratap
2 Replies

8. Shell Programming and Scripting

Resolving the environment variable from a file

Hi, I an having some environment variables exported and the variable name is present in the file. But its not resolving with following commands. Can someone throw some light. db $ grep -v "^#" TD_FWK_NUCLEUS.dbc | grep -v "^$" | xargs -i echo {} wb_bin: ${TD_FWK_NUCLEUS_DBC_WB_BIN_TAG} I... (3 Replies)
Discussion started by: Mohammed Rafi
3 Replies

9. Shell Programming and Scripting

How to change Linux Terminal environment variable in a perl or bash script?

Hi, I meet an problem that it cannot change Terminal environment variable in a perl or bash script. This change can only exist and become effective in script lifetime. But I want to make this change take effect in current opened Terminal. In our view, the thought seems to be impossible, As... (9 Replies)
Discussion started by: weichanghe2000
9 Replies

10. UNIX for Dummies Questions & Answers

Environment variable substitution in Linux make

I know that I can do this in bash ver=${VERSION:-$DEFVERSION} so ver is $VERSION if it's set but $DEFVERSION if $VERSION isn't set I want to do the same thing as a macro in a Makefile and can't get it to work - maybe something like... VER=$(shell ${$(VERSION):-$(DEFVERSION)}) Any help... (1 Reply)
Discussion started by: JerryHone
1 Replies
urxvt(1)							   RXVT-UNICODE 							  urxvt(1)

NAME
urxvtc - control the urxvtd daemon SYNOPSIS
urxvtc [same options as for urxvt] DESCRIPTION
This manpage describes the urxvtc client program. It connects to the urxvtd daemon and requests a new terminal window. It takes the same arguments as the urxvt program. The environment will also be respected. Currently, it always returns immediately after contacting the daemon. OPTIONS
All options that are valid for urxvt are valid for urxvtc, too. Please note that options are interpreted in the context of the daemon process. However, as current working directory, process environment and any file descriptor (e.g. for "-pty-fd") are preserved, this rarely makes a difference. EXIT STATUS
If everything went well, urxvtc returns with an exit status of 0. If contacting the daemon fails, it exits with the exit status 2. In all other error cases it returns with status 1. This can be used to implement auto-starting behaviour, by checking for an exit status of 2, running "urxvtd -f -q" and retrying the call to urxvtc, like this: #!/bin/sh urxvtc "$@" if [ $? -eq 2 ]; then urxvtd -q -o -f urxvtc "$@" fi ENVIRONMENT
All environment variables of the current process will be made available to the new instance, and will be interpreted as if urxvt were started directly. RXVT_SOCKET Both urxvtc and urxvtd use the environment variable RXVT_SOCKET to create a listening socket and to contact the urxvtd, respectively. If the variable is missing, $HOME/.urxvt/urxvtd-<nodename> is used. The variable must specify the absolute path of the socket to create. SEE ALSO
urxvt(7), urxvtd(1) 9.15 2014-05-07 urxvt(1)
All times are GMT -4. The time now is 11:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy