if you want to get all arguments in one go use $0.
I am new to the forum so I was browsing some of the old threads, I noticed this post and unless this works differently in the shell you are using the above quote is incorrect. Maybe it was just an oversight.
$0 refers to the name of the command itself, $* will provide all arguments at once. See below:
Hi,
I have two shell variables $t1 and $t2 which I need to pass to a function in a shell script. The function will do some computation with those two variables and echo the resultant. But I do not know how to pass teh arguments.
The function written is
f1()
{......
........
}
What should... (3 Replies)
Hi,
I have a shell script called ftp.sh which is running continously in background.
I tried passing arguments to this script but it did not worked out.
Below is ftp.sh script. Please help me
case $param in
start) sleep_func "300"
echo "!ksh $scr_ddir/ftp.sh... (1 Reply)
Hi,
I have a my script here--
print "The Perl Script does the User health check and system health check...\n";
print "---------------------------------------------------------------------\n";
# use strict;
my($OS);
$OS = $^O;
# need to test @ARGV before GetOptions shifts it
if (@ARGV... (1 Reply)
Hi,
I want to run a target of makfile using script by passing different arguments to it again n again. I i need to grep certain things from the log file.
eg
make abc KAB=8 BAC=8 >& KAB_BAC.log
grep "timeA" KAB_BAC.log
grep "timeB" KAB_BAC.log
(i want to store the difference of the two time... (0 Replies)
hi,
Is it possible to pass arguments to a sftp script and use those arguments in the program?
for example
sftp_script
FILENAME=$1
#!/usr/bin/expect
spawn /usr/bin/sftp abc@ftp.abc.com
expect "abc@ftp.abc.com's password:"
send "pass\r"
expect "sftp>"
send "mput $FILENAME\r"... (9 Replies)
myscript.sh
#!/bin/bash
ARGA=$1
if ; then
echo "${ARGA}:Confirmed"
else
echo "${ARGA}:Unconfirmed"
fi
when I run the above script from the command line, i run it as:
./myscript.sh jsmith
now some times, i need to runn it this way: (8 Replies)
I've tried to find a solution to this, but I"m stumped.
OS - RH Linux 5.9
I have a bash script <myProgram.sh> that gets executed manually and creates a small response file. I'm trying to automate the running of this script.
When myProgram.sh runs, it prompts the user to enter 2 pieces of... (13 Replies)
Dear Users,
I have installed a standalone program to do multiple sequence alignment which takes user parameters to run the program. I have multiple sequence files and want to automate this process through a bash script. I have tried to write a small bash code but its throwing errors.
Kindly... (13 Replies)
Hi all,
I am working on a project, in which I have to connect to Bluetooth low energy device. I am able to connect and do data transfer from command line. But I want to do from script
Here is my script
#!/bin/bash
#sudo hcitool -i hci0 lescan
sleep 1
sudo hcitool -i hci0 lecc --random... (8 Replies)
suppose i have a perl script that is normally run this way:
./checkdisk.pl -H hostname -w 40 -c 80
but, for whatever reason, i cannot run the script directly as it should. But i can cat it through pipe. How can i pass the arguments "-H hostname -w 40 -c 80"?
so this is what i'm doing,... (6 Replies)
Discussion started by: SkySmart
6 Replies
LEARN ABOUT PHP
cfingerd.text
CFINGERD.TEXT(5) Configurable Finger Daemon CFINGERD.TEXT(5)NAME
cfingerd.text - cfingerd text rules
EXPLANATION
cfingerd offers different commands that can be placed in text files to display corresponding information. Each command used with cfingerd
in text files begins with a dollar-sign (or a "$"). This usually indicates to cfingerd that when it's displaying a file, it issues the
command given directly after that character and inserts its output.
If you want to display a raw "$" sign, simply put two "$" signs together, or "$$".
Text commands are only parsed if ALLOW_LINE_PARSING is enabled in /etc/cfingerd/cfingerd.conf(5). If it is disabled the text files will be
sent as is, complete with any single or double dollar signs they may contain.
TEXT COMMANDS
The following is a list of text commands and what they do. They are checked case insensitively.
$CENTER will display the entire contents of the line. This command must start at the beginning of the line. This is a very common com-
mand.
$DATE displays the current system date in the format of MM/DD/YY.
$TIME displays the current system time in the format HH:MM A/PM (timezone).
$IDENT displays the identity of the current person fingering your system.
$COMPILE_DATETIME displays the date and time of which the current issue of cfingerd was compiled on your system.
$VERSION displays the current version of cfingerd.
$EXEC executes the rest of the line as a system command and send the output to the fingering user. Pipes, parameters etc. are available.
The $EXEC command must be on a line by itself in order to function properly. The command is executed as nobody.nogroup if used in a system
file. If used in a user file (e.g. .plan) the command is executed as that particular user. cfingerd will fork() before executing the new
command and will drop all priviledges so this is safe.
This feature is only available if ALLOW_EXECUTION is enabled in cfingerd.conf. The program may prodeuce a maximum of 10MB of output.
CONTACTING
If you like the software, and you want to learn more about the software, or want to see a feature added to it that isn't already here, then
please write to cfingerd@infodrom.north.de. The project's webpage is at http://www.infodrom.north.de/cfingerd/ .
SEE ALSO cfingerd(8), cfingerd.conf(5), finger(1), userlist(1), any of the included docs with the standard cfingerd distribution.
1.4.2 7 Aug 1999 CFINGERD.TEXT(5)