10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I have this awk code in a bash script to perform a find and replace task. This finds one unique line in a file and substitutes the found line with a replacement.
#! /bin/bash
# value determined elsewhere
total_outputs_p1=100
# file being modified... (5 Replies)
Discussion started by: LMHmedchem
5 Replies
2. Shell Programming and Scripting
The below bash function uses multiple variables CODING, SAMPLE, SURVEY, andvariant
in it. The user selects the cap function and details are displayed on the screen using the $SURVEY variable, the directory is changed to $SAMPLE and the samples.txt is opened so the user can select the sample to... (6 Replies)
Discussion started by: cmccabe
6 Replies
3. UNIX for Beginners Questions & Answers
Hi Gurus,
Is there a way to call a variable inside a function anywhere within the script?
Thanks.
BR,
Ernesto (2 Replies)
Discussion started by: ernesto
2 Replies
4. Shell Programming and Scripting
Hi,
I'm a Delphi developer new to linux, new to this forums and new to BASH programming and got a new task in my work: maintaining an existing set of BASH scripts. First thing I want to do is making the code more reliable as in my opinion it's really bad written. So here's the quest:
I'm... (6 Replies)
Discussion started by: rse
6 Replies
5. Shell Programming and Scripting
Hi
I have created a function in a Shell Script test.sh
function fnTest()
{
echo "My first Method
}
I have called this function in my test.sh
cat abc.txt | grep "test"
echo " test"
fnTest
But while running the shell script i got the following error:
... (2 Replies)
Discussion started by: nanthagopal
2 Replies
6. Shell Programming and Scripting
Below is my script that is function properly per my conditions but I am facing one problem here that is when one function fails then Iy should not check other functions but it calls the other function too So anyone can help me how could i achieve this?
iNOUT i AM GIVING TO THE... (1 Reply)
Discussion started by: rohit22hamirpur
1 Replies
7. Shell Programming and Scripting
Dear all,
Could you please advice as I when call function i found the following error
" refills: command not found" note that refills is function name.
following also the function and how i call it
function refills
{
echo "formatting refills and telepin" >> $log
awk -F,... (20 Replies)
Discussion started by: ahmed.gad
20 Replies
8. Infrastructure Monitoring
Hello,
I have a problem with package and name space.
require "/Mehran/DSGateEngineLib/general.pl";
use strict;
sub System_Status_Main_Service_Status_Intrusion_Prevention
{
my %idpstatus;
my @result;
&General_ReadHash("/var/dsg/idp/settings",\%idpstatus);
#print... (4 Replies)
Discussion started by: Zaxon
4 Replies
9. Shell Programming and Scripting
hello,
when i call function inside awk traitement it doesn't work, i don't have error execution but i don't get result and if i call the function outside awk traitement it work well..
there's something special in awk call function??
here is the example :
awk -F "," '{ {first=$1; sec=$2;... (3 Replies)
Discussion started by: kamel.seg
3 Replies
10. Programming
Hi, Can anyone help me figure out the problem I'm having with a function call?
I have a header file, which sets an enum:
typedef enum {INFO, WARNING, FATAL} Levels;
int log_event (Levels, char *fmt, ...);
..then the function is called this way:
log_event(INFO, "Message text");
... (6 Replies)
Discussion started by: Stevhp
6 Replies