Help needed, linking to file in different sub-folder
Hello,
I'd really like some help on this, a PERL-CGI script (complete working script is below).
How can I add the server's root folder (folder_f) to this:
~ s/_e\.shtml/_f\.shtml/
This bit of code searches all occurences of _e.shtml and replaces them with _f.shtml (it being in the same folder).
Yet, in between that, I would like to be able to add the server's root of "folder_f" folder in there, or done another way if it has to.
My script is called "change-language.pl" - which has a hyperlink to it in "file_e.shtml". When clicked, it will try to find the file "file_f.shtml".
For example of what I would like it to do:
~ s/_e\.shtml/(Link-to-FOLDER_F)_f\.shtml/ (found in script below, but I added (FOLDER_F).
I tried: $calling_page =~ s/_e\.shtml/'s/^/$.\f'\/_f\.shtml/;
but it did not work. It brings me to the same _e.shtml file.
I would really appreciate anyone's help on this one, as I can't seem to get it right, with what I know so far.
The complete script is below, which works but only if both language files (file_e.shtml and file_f.shtml) reside in the same folder. I need to be able to have the script work, so that it will find the file (file_f.shtml) but in a different sub-folder on the server's root called "FOLDER_F" folder.
In the part $calling_page =~ s/_e\.shtml/_f\.shtml/; of the script, is there a way to do this:
$calling_page =~ s/_e\.shtml(Link-to_FOLDER_F)/_f\.shtml/; - FOLDER_F being in parentheses is where I would like to be able to have the script modified so that it goes to a sub-folder and get file_f.shtml in FOLDER_F sub-folder.
What I have so far follows WORKS, but only works if both _e.shtml and _f.shtml files are in the same folder:
( categories: command line parameters | perl modules )
By default perl looks for modules in the standard library path and the current directory. Sometimes you need to use some modules that are installed in non standard locations; there are several ways to deal with this situation: -- Install the module somewhere in the standard library path
If you have administrator privileges, then the best solution is to install the modules in any of the system defined library paths (you can get the paths executing perl -le 'print foreach @INC'). -- Set the environment variable PERL5LIB
Perl will look for modules in the directories specified in PERL5LIB environment variable before looking in the standard library and current directory, so you can set this variable to locate your modules.
How to create a shell script to create a folder by using the today's date to take backup using rsync command on every evening around 7 pm.
Kindly help.
Thanks.
To be more precise,
I want to create a script which matches the today's date with server's date format, if matches then creates the... (2 Replies)
need a shell script for the following requirement
how to generate 5 versions of a file in a folder
after generating them in a folder i want to maintian the past 2 versions of the file in the folder and i have to delete the the remaining.
for example if i ran the script today and tommorow... (3 Replies)
Hi all,
let me explain my requirments
i am having 5 folder with different name for eg) abc , cdf , efd, rtg, ead
each 5 folders contain 15 files
i want to move 10 files to some other folder, remain 5 files should be there in the same folder.
give me some suggestion on this. (6 Replies)
This is the file structure:
DESKTOP/Root of Photo Folders/Folder1qweqwasdfsd/*jpg
DESKTOP/Root of Photo Folders/Folder2asdasdasd/*jpg
DESKTOP/Root of Photo Folders/Folder3asdadfhgasdf/*jpg
DESKTOP/Root of Photo Folders/Folder4qwetwdfsdfg/*jpg
DESKTOP/Root of Photo... (4 Replies)
i will tell my problem with example:
if i have a folder name called sree1.7.3
i know the starting name say sree and also path say /usr/lib.
so i want the folder name.
and how can i link this folder in makefile
thank u
sree (1 Reply)
Oracle procedure create files on UNIX folder on a regular basis. I need to FTP files onto windows server and place the files, based on their name, in the corresponding folders. File name is as follows: ccyymmddfoldernamefile.txt; Folder Name length could be of any size; however, the prefix and... (3 Replies)
Hi,
I have written a makefile and am facing some problem in linking..
This is the first makefile i write.. i think that am just compiling all the .c files and not linking the object files.. can anybody tell me how to link all the .o files???
When i do make all i am getting the following... (1 Reply)
hi,
This is the first time I work in a big C project. All source code files are located in say directory /source/pp and all header files are in /include/pp. I've created a link to both of these directories from my home dir, say /home/ss. So in the /home/ss dir I have the /source/pp and /include/pp... (1 Reply)
Hi
I'm getting
ld: fatal: option -h and building a dynamic executable are incompatible
ld: fatal: Flags processing errors
When I run
ld -shared -L/usr/dt/lib -lDtSvc -o builtin.so Workspace.o
after running
gcc -fPIC -I/usr/X11R6/include -I/usr/dt/include -c Workspace.c
I'm... (6 Replies)
i am trying to link the text files that i generated from my shell script to an html page, to that i can view them using a browser, like internet explorer.
i want to open the text files in html page when i enter a command to view the text file from the shell command.
please could anyone help... (1 Reply)