10-04-2016
there is no misunderstanding no need to post that much i know how it works.
i post my code wich is working but have a loop issue then you gave me some advice wich i try to apply at best .
then
your colleague gave another way to do it wich i tryed also but has it's not my code anymore i don't know how to use it that's why i ask an "example" related to my code.
I didn't ask to write the code for me but just an example to help me understand
And this kind of answer "Did you REALLY try that pseudo code verbatim?" does not provide help even if it look stupid to you
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I use AIX (ksh) and Linux (bash) servers. I'm trying to do scripts to will run in both ksh and bash, and most of the time it works. But this time I don't get it in bash (I'm more familar in ksh).
The goal of my script if to read a "config file" (like "ini" file), and make various report.... (2 Replies)
Discussion started by: estienne
2 Replies
2. Shell Programming and Scripting
I'm trying to understand if it's possible to create a set of variables that are numbered based on another variable (using eval) in a loop, and then call on it before the loop ends.
As an example I've written a script called question (The fist command is to show what is the contents of the... (2 Replies)
Discussion started by: DeCoTwc
2 Replies
3. Shell Programming and Scripting
Hi,
Sorry I'm new to shell scripting..
my loop is as follows:
let i=0
for item in ${APPSARRAY}
do
#..some code to get a unique value called $result
let i=i+1
done
What I want to do is within the for loop, create a comma seperated list:
... (3 Replies)
Discussion started by: mjwoodford
3 Replies
4. Shell Programming and Scripting
Hi all
Sorry for the basic question, but i am writing a shell script to get around a slightly flaky binary that ships with one of our servers. This particular utility randomly generates the correct information and could work first time or may work on the 12th or 100th attempt etc !.... (4 Replies)
Discussion started by: rethink
4 Replies
5. Shell Programming and Scripting
Hello,
I have a script that runs a series of commands. Halfway through the script, I want it to check whether everything is going alright: if it is, to proceed with the script, if it isn't to repeat the last step until it gets it right.
My code so far looks like this, simplified a bit:
... (3 Replies)
Discussion started by: Leo_Boon
3 Replies
6. Shell Programming and Scripting
This is a short program I wrote to search through a directory and move files containing the keyword to a folder.
#!/bin/bash
echo 'What is the directory?'
read DIR
echo -e '\n'
echo 'What is the keyword?'
read KEY
echo -e '\n'
cd $DIR
rmdir 'relevant_files'
mkdir 'relevant_files'... (5 Replies)
Discussion started by: zenyoul
5 Replies
7. Shell Programming and Scripting
Hi,
I have the following folder structure:
TST500-1000
TST500-2000
TST500-3000
TST700-1000
TST700-2000
TST700-3000
TST900-1000
TST900-2000
TST900-3000
I would like to store the numbers in the first column (considering "-" as column separator) into a variable then the numbers in... (3 Replies)
Discussion started by: alex2005
3 Replies
8. Shell Programming and Scripting
Hello Community,
I'm a little new to shell scripting and i was trying to write a servo control script for my Raspberry PI, using raspbian.
here is the code.
#!/bin/sh
#Signal time
signal_time_gpio27=0.0015s
#Delay time
signal_delay_gpio27=0.02s
if
grep -lq 0... (1 Reply)
Discussion started by: drux
1 Replies
9. Shell Programming and Scripting
Hi,
In the code "for loop" has been used to search for files (command line arguments) in directories and then produce the result to the standard output. However, I want when no files are named on the command line, it should read a list of files from standard input and it should use the command... (7 Replies)
Discussion started by: Ra26k
7 Replies
10. Shell Programming and Scripting
Hi, I'm new to bash, and have an example menu script using Zenity. It works fine if the user enters A B or C, but if the user enters nothing, I can only figure out how to exit the script. How do I get the menu to reappear if no input is selected?
The script is:
title="Select example"... (2 Replies)
Discussion started by: allen11
2 Replies