There's a Unix configuration file that needs to be executed at the start of my script
The location of the file is
Now the script has to be deployed into a new UAT server for testing
where the location above has been change to
The problem is if I hard code the file location in my script,
the script is usre to abort when migrated onto the new UAT server
BECAUSE in the UAT server , it wouldn't be able to find the location What I was looking for is :
Both these paths have a portion in common,, ie.,
So, isnt there any way that I can access the file
where the path of the file has
in it ?
How to generalise the file path if a portion of it is always common ?
Thanks
Kumarjit.
Last edited by Scrutinizer; 03-14-2013 at 08:28 AM..
Reason: extra code tags
Hello,
I am creating a file with all the source folders included in my git branch, when i grep for the used source, i found source included as relative path instead of absolute path, how can convert relative path to absolute path without changing directory to that folder and using readlink -f ? ... (4 Replies)
Hi i'm new to shell script,
i want to get the filename from specific location which i mentioned in my script.
The scirpt should read the filename exactly using the following command "ls -ltr | tail -1".
Could someone show me on this. Below is my script
#!/bin/ksh
PATH= /usr/
if
then
... (4 Replies)
Hi,
I have a file abcd.txt which has contents in the form of full path file names i.e.
$home> vi abcd.txt
/a/b/c/r1.txt
/q/w/e/r2.txt
/z/x/c/r3.txt
Now I want to retrieve only the directory path name for each row
i.e
/a/b/c/
/q/w/e/
How to get the same through shell script?... (7 Replies)
I know this is very newbie ... but I need help determining the proper file path to file...Have no idea how to do this
I'm on a Mac OS X 10.6 Snow Leopard
thanks very much (4 Replies)
hi experts(novice people can stay away as it is no child's game),
i am developing a script which works like recycle bin of windows.
the problem i am facing is that when ever i am trying to delete a file which is situated in parent directory or parent's parent directory i am unable to capture... (5 Replies)
hi experts(novice people can stay away as it is no child's game),
i am developing a script which works like recycle bin of windows.
the problem i am facing is that when ever i am trying to delete a file which is situated in parent directory or parent's parent directory i am unable to capture... (1 Reply)
Hi Frindz,
I want to get the entire path of a file.
I am in root directory and i know the file name, However dont know the path where it is.
Please tell me the command to get the entire path for the file?
Thanks in advance,
Rashmy. (14 Replies)
Hi,
I have a file with about 60 lines of path:
app-defaults/boxXYZ.......
I want to change this to /my/path/goes/here/app-defaults/boxXYZ, but of course vi doesn't like the regualr :s/old/new/ command.
Is there any other quick way to do this?
Thanks ;) (2 Replies)