02-23-2005
$0 variable using ". file" format
I need to access the script name within a korn shell script.
cat tst1.sh
echo Script Name: $0
when tst1.sh is run normally the script reports "Script Name: tst1.sh"
However when I run the shell as ". tst1.sh" the script reports:
"Script Name: -ksh"
How do I access the script name when call the script ". tst1.sh" ?
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Ok, this is going to be hard to describe, but here it goes.
I have written a bash script that, while executing starts a timer, and when done stops the timer. The $RUNTIME variable value is in seconds, so the variable usually equals a number like 126 (equals 2 minutes 6 seconds). In my script I... (3 Replies)
Discussion started by: vikingshelmut
3 Replies
2. UNIX for Dummies Questions & Answers
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies
3. Shell Programming and Scripting
Hi,
I've modified the syslogd source to include a thread that will keep track of a timer(or a timer thread). My intention is to check the file size of /var/log/messages in every one minute & if the size is more than 128KB, do a echo " " > /var/log/messages, so that the file size will be set... (7 Replies)
Discussion started by: jockey007
7 Replies
4. Shell Programming and Scripting
Hello Team ,
I have to extract date section from the below file output. The output of the file is as shown below.
I have to extract the "" this section from the above output of the file. can anyone please let me know how can we acheive this? (4 Replies)
Discussion started by: coolguyamy
4 Replies
5. Shell Programming and Scripting
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Discussion started by: shis100
7 Replies
6. Programming
Hi ,
can any one tell me,"How to extract the same format from existing excel file to new excel file " using Spreadsheet::WriteExcel or Spreadsheet::ParseExcel module ???
Example_pgm:
Below program is used to read existing excel file..In this program "my $cell = $_;" line is used to... (0 Replies)
Discussion started by: kavi.mogu
0 Replies
7. Shell Programming and Scripting
Hi all.
I have a .txt file that I need to sort it
My file is like:
1- 88 chain0 MASTER (FF-TE) FFFF 1962510 /TCK T FD2TQHVTT1 /jtagc/jtag_instreg/updateinstr_reg_1 dff1 (TI,SO)
2- ... (10 Replies)
Discussion started by: Behrouzx77
10 Replies
8. UNIX for Dummies Questions & Answers
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies
9. Shell Programming and Scripting
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
LEARN ABOUT DEBIAN
cscope-indexer
cscope-indexer(1) General Commands Manual cscope-indexer(1)
NAME
cscope-indexer - Script to index files for cscope
SYNOPSIS
cscope-indexer [-v] [-f database_file] [-i list_file] [-l] [-r]
DESCRIPTION
This script generates a list of files to index (cscope.out), which is then (optionally) used to generate a cscope database. You can use
this script to just build a list of files, or it can be used to build a list and database. This script is not used to just build a data-
base (skipping the list of files step), as this can be simply done by just calling "cscope -b".
Normally, cscope will do its own indexing, but this script can be used to force indexing. This is useful if you need to recurse into sub-
directories, or have many files to index (you can run this script from a cron job, during the night). It is especially useful for large
projects, which can contstantly have source files added and deleted; by using this script, the changing sources files are automatically
handled.
Currently, any paths containing "/CVS/" or "/RCS/" are stripped out (ignored).
OPTIONS
-f database_file
Specifies the cscope database file (default: cscope.out).
-i list_file
Specifies the name of the file into which the list of files to index is placed (default: cscope.files).
-l Suppress the generation/updating of the cscope database file. Only a list of files is generated.
-r Recurse into subdirectories to locate files to index. Without this option, only the current directory is searched.
-v Be verbose. Output simple progress messages.
SEE ALSO
cscope(1)
AUTHOR
This manual page was written for the Debian GNU/Linux system by Robert Lemmen <robertle@semistable.com> (but may be used by others, of
course)
Script to index files for cscope 30. December 2002 cscope-indexer(1)