Sponsored Content
Top Forums Shell Programming and Scripting What is the function of the following lines at the top of a shell script file: Directory and Script? Post 302972302 by remytom on Wednesday 4th of May 2016 12:34:39 AM
Old 05-04-2016
What is the function of the following lines at the top of a shell script file: Directory and Script?

The file starts like this:

Code:
Directory: <path to the script>
Script: <script fife name>

#!bin/ksh

##Comments

<actual script>

What is the use of the first two lines in the script? What if I save the file without them? What will be the effect? They are not comments. Im very new to this, please help!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

extracting function headers in a c/c++ file using shell script

Hi, Is there any way to extract function headers from c and c++ files using a shell script? I tried to do it by reading the C/C++ file line by line and if a line matches a particular pattern (pattern of function header) i extracted it otherwise moved to next line. The problem here is, some... (3 Replies)
Discussion started by: priyadarshini
3 Replies

2. Shell Programming and Scripting

Calling a function in cpp file inside shell script

Hi I need to call a function written in a cpp file with arguments inside the shell script..Can anyone help me how to do this:( (1 Reply)
Discussion started by: rkrish
1 Replies

3. Homework & Coursework Questions

Shell Script - (file and directory)

The question is here: http://farm9.staticflickr.com/8065/8217767191_2154e64904_b.jpg My problem is that when I made up a non-existing directory, it prints out "hiii". It didn't enter the first if statement. It works if my directory exist. My Work: for fileOrDirectory in $* # all... (1 Reply)
Discussion started by: spider-man
1 Replies

4. Homework & Coursework Questions

Shell Script - (File and Directory)

1. The problem statement, all variables and given/known data: My problem is that when I made up a non-existing directory, it prints out "hiii". It didn't enter the first if statement. It works if my directory exist. 2. Relevant notes: The question is here:... (3 Replies)
Discussion started by: spider-man
3 Replies

5. UNIX for Dummies Questions & Answers

Shell script to read lines in a text file and filter user data Shell Programming and Scripting

sxsaaas (3 Replies)
Discussion started by: VikrantD
3 Replies

6. Shell Programming and Scripting

Shell scripting-I need a script which should watch a directory for a file with specific directory

I need a script which should watch a directory for a file with specific directory. If it finds a file in directory, it should search for few specific keyword in the file. if the keyword exists, it should trim string from specific column. The file should be moved to another directory and the a... (8 Replies)
Discussion started by: akashdeepak
8 Replies

7. Shell Programming and Scripting

Shell Script function to use script name for log file output

Hi Team - I"m very new to Shell Scripting so I have a rather novice question. My forte is Windows Batch Scripting so I was just wondering what the Shell Script equivalent is to the DOS command %~n? %~n is a DOS variable that dispayed the script name. For instance (in DOS): REM... (11 Replies)
Discussion started by: SIMMS7400
11 Replies

8. Shell Programming and Scripting

Script to search every file in a directory and print last few lines

Hi everyone, I need to write a script to search a directory, output the name of a file to an ouput file and print the last few lines of the files to the output file such that I would have something like this: FILE1: LINE LINE LINE FILE2: LINE LINE LINE FILE3: LINE LINE LINE... (2 Replies)
Discussion started by: mojoman
2 Replies

9. Shell Programming and Scripting

Shell script cannot create directory and move the file to that directory

I have a script, which is checking if file exists and move it to another directory if then mkdir -p ${LOCL_FILES_DIR}/cool_${Today}/monthly mv report_manual_alloc_rpt_A_I_ASSIGNMENT.${Today}*.csv ${LOCL_FILES_DIR}/cool_${Today}/monthly ... (9 Replies)
Discussion started by: digioleg54
9 Replies

10. Shell Programming and Scripting

Shell script to pass the config file lines as variable on the respective called function on a script

I want to make a config file which contain all the paths. i want to read the config file line by line and pass as an argument on my below function. Replace all the path with reading config path line by line and pass in respective functions. how can i achieve that? Kindly guide. ... (6 Replies)
Discussion started by: sadique.manzar
6 Replies
Jifty::Script::FastCGI(3pm)				User Contributed Perl Documentation			       Jifty::Script::FastCGI(3pm)

NAME
Jifty::Script::FastCGI - A FastCGI server for your Jifty application SYNOPSIS
AddHandler fastcgi-script fcgi FastCgiServer /path/to/your/jifty/app/bin/jifty -initial-env JIFTY_COMMAND=fastcgi Options: --maxrequests maximum number of requests per process --help brief help message --man full documentation DESCRIPTION
FastCGI entry point for your Jifty application options --maxrequests Set maximum number of requests per process. Read also --man. --help Print a brief help message and exits. --man Prints the manual page and exits. DESCRIPTION
When you're ready to move up to something that can handle the increasing load your new world-changing application is generating, you'll need something a bit heavier-duty than the pure-perl Jifty standalone server. "FastCGI" is what you're looking for. If you have MaxRequests options under FastCGI in your config.yml, or command-line option "--maxrequests=N" assigned, the FastCGI process will exit after serving N requests. SERVER CONFIGURATIONS
Apache + mod_fastcgi # These two lines are FastCGI-specific; skip them to run in vanilla CGI mode AddHandler fastcgi-script fcgi FastCgiServer /path/to/your/jifty/app/bin/jifty -initial-env JIFTY_COMMAND=fastcgi DocumentRoot /path/to/your/jifty/app/share/web/templates ScriptAlias / /path/to/your/jifty/app/bin/jifty/ Apache + mod_fcgid + mod_rewrite An alternative to Apache mod_fastcgi is to use mod_fcgid with mod_rewrite. If you use mod_fcgid and mod_rewrite, you can use this in your Apache configuration instead: DocumentRoot /path/to/your/jifty/app/share/web/templates ScriptAlias /cgi-bin /path/to/your/jifty/app/bin DefaultInitEnv JIFTY_COMMAND fastcgi <Directory /path/to/your/jifty/app/bin> Options ExecCGI SetHandler fcgid-script </Directory> <Directory /path/to/your/jifty/app/share/web/templates> RewriteEngine on RewriteRule ^$ index.html [QSA] RewriteRule ^(.*)$ /cgi-bin/jifty/$1 [QSA,L] </Directory> It may be possible to do this without using mod_rewrite. Lighttpd (<http://www.lighttpd.net/>) Version 1.4.23 or newer is recommended, and you may adapt this config: server.modules = ( "mod_fastcgi" ) server.document-root = "/path/to/your/jifty/app/share/web/templates" fastcgi.server = ( "/" => ( "your_jifty_app" => ( "socket" => "/tmp/your_jifty_app.socket", "check-local" => "disable", "fix-root-scriptname" => "enable", "bin-path" => "/path/to/your/jifty/app/bin/jifty", "bin-environment" => ( "JIFTY_COMMAND" => "fastcgi" ), "min-procs" => 1, "max-procs" => 5, "max-load-per-proc" => 1, "idle-timeout" => 20, ) ) ) Versions before 1.4.23 will work, but you should read Plack::Handler::FCGI's lighttpd documentation <http://search.cpan.org/dist/Plack/lib/Plack/Handler/FCGI.pm#lighttpd> for how to configure your server. More information Since this uses Plack::Handler::FCGI, you might also want to read its documentation on webserver configurations <http://search.cpan.org/dist/Plack/lib/Plack/Handler/FCGI.pm#WEB_SERVER_CONFIGURATIONS>. METHODS
run Creates a new FastCGI process. perl v5.14.2 2011-01-25 Jifty::Script::FastCGI(3pm)
All times are GMT -4. The time now is 04:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy