10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all.
I need a bash script to run a function remotely. I think it should be similar to the following but can't figure out the exact syntax.
Here is the script:
#!/bin/bash
function nu ()
{
for var in {0..5}; do printf "$var, "; done; echo
}
ssh host "$(typeset -f); nu"
... (9 Replies)
Discussion started by: ziguy
9 Replies
2. Shell Programming and Scripting
I have a fortran file with code declarations such as
Subroutine str_tnum_tu &
( &
s, dl, tu, pos &
)
!
Class (*), Intent (InOut) :: tu(:)
Character (Len=*), Intent (In) :: s, dl
Character (Len=*), Intent (In), Optional :: pos
...
or
... (11 Replies)
Discussion started by: kristinu
11 Replies
3. Shell Programming and Scripting
Hello Everyone,
I am writing a shell script to fetch log files from remote servers within a time range. It copies log files to local server, grep for date and then compares the time stamp of each log entry with the once specified.
Below is the code.
# Get log and Parsing function
... (1 Reply)
Discussion started by: kanagalamurali
1 Replies
4. Shell Programming and Scripting
Hi All,
I have a cron job set up which is set to run every 10 seconds.
What I need to do is have the script do a check to see if it is already running such that if it is running it wont fire up additional instances and processes according to its normal process.
For example if I have a script... (4 Replies)
Discussion started by: landossa
4 Replies
5. Shell Programming and Scripting
Hi All I am trying to convert some Fortran subroutine to awk function , those who know kindly explain how to define function in awk, and how to call function
Fortran subroutine looks somewhat like this
SUBROUTINE GDATE (JD, YEAR,MONTH,DAY)
C
C---COMPUTES THE GREGORIAN CALENDAR DATE... (5 Replies)
Discussion started by: Akshay Hegde
5 Replies
6. Shell Programming and Scripting
I an using the below functions in my script.
---------
checkRT()
{
subHeader "Runtime Check"
for nn in `cat $HOST_FILE|egrep -i 'msdp|ca|backup|db'|grep -v '#'|sed '/^$/d'|awk '{ print $1":"$2":"$3}'`
do
fhba=`expr $nn|cut -d: -f2`
fhba2=`expr $nn|cut -d: -f3`
subSubHeader $fhba2
ssh... (1 Reply)
Discussion started by: nandan8a
1 Replies
7. Shell Programming and Scripting
I've found a few posts regarding passing parameters to a function or subroutine, but for some reason when I try to run a command based on part with these parameters it's not working. If I have the function echo the parameters they show correctly so I believe they are being passed right but the... (2 Replies)
Discussion started by: withanh
2 Replies
8. Shell Programming and Scripting
Hi,
I have the below script that should take the command line option and run the desired script on another server. Only it doesn't seem to run the function, infact it just returns back to the command line.
case $1 in
1) msgbacklog() ;;
2) jobstatus() ;;
... (10 Replies)
Discussion started by: chris01010
10 Replies
9. Shell Programming and Scripting
i have a problem regarding running an ssh command while inside "function"
script structure
#!/usr/bin/bash
func1(){
script=$1
ssh user@server "$script"
}
cat script.txt | while read line
do
func1 $line
done
exit 0
the problem is when ssh ran,... (1 Reply)
Discussion started by: ryandegreat25
1 Replies
10. Shell Programming and Scripting
I have issue running functions under case statement
#!/bin/bash
single() {
Commands
}
multiple() {
Commands
}
until ; do
echo -e " \t \t M A I N - M E N U Perforce delete script \n" (1 Reply)
Discussion started by: sriram003
1 Replies