Using the hash # as a field separator in config file is a bad choice and may lead to confusion.
By convention, the # is used for commenting lines, so i suggest you to choose another delimiter (:;, colon in the example below) so you will stay compliant with the standard.
I having problem when I call this cleanupmenu function within a script. It continuously loops and goes to selection * That wasn't a valid selection. I have to kill it everytime to stop it. What am I doing wrong. I use this function menu in several other scripts and I don't have this problem at... (2 Replies)
Dear all
How to write the shell script for the following statement:
(C programming)
for (i=0;i<30;i++) {
if i=1
continue *skip this number
(To do function here....)
...
}
similar statement in while loop....
I wrote the script in sh... (3 Replies)
Does anyone know what __read_nocancel does and why it would go into an infinite loop?
What I have gathered in my searches is that it pertains to server code. Yet, I'm not running this application in server mode.
NOTE: There are server functions in the shared object, but the specific code... (3 Replies)
Hi all,
I am trying to call a function in for loop in the below format
#!/bin/bash
abc()
{
commands
}
for (( i=0; i<=10; i++ ))
do
abc
done
The error i am getting when trying to execute:
syntax error: unexpected end of file
canany one help me where i am going wrong?? (5 Replies)
my ksh script is not working...
i wanna remove lines in file2.txt from file1.txt
# cat file1.txt
this is line one
this is line two
this is line three
this is line four
this is line five
# cat file2.txt
this is line two
this is line three
# cat my_script.ksh
#!/bin/ksh
i=1
y=1... (8 Replies)
Hi ALL,
I want to replace string occurrence in my file "Config" using a external file named "Mapping" using awk.
$cat Config
! Configuration file for RAVI
! Configuration file for RACHANA
! Configuration file for BALLU
$cat Mapping
ravi:ram
rachana:shyam
ballu:hameed
The... (5 Replies)
Hi,
I was working on implementing error handling in my bash scripts, and decided to use trap to send myself an email incase of any errors. But it seems that somethings has gone wrong, and I am continuously getting same emails for an old error repeatedly (even though I have stopped/killed all... (1 Reply)
Hi All,
I have created one function for KSH and was running well with one parameter input since I just had to use $1 to get the parameter.
Now I want to do loop for each parameter(actually filenames) . I have try to use do loop, but $i does not resolve to parameter instead it resolves to 1,... (5 Replies)
Hello Experts,
I have created one user confirmation process that will ask for user input. I have created one func for it. The issue is if i call it as normal then it works fine but if i am calling it in another script(in while loop) . It is going in infinite loop and not asking for user input. ... (8 Replies)