10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
OK,
I know function has to be defined first - in sequence - before it can be used.
So the script has to be build "bottoms -up style, if you pardon my expression.
I am running into a problem reusing function and breaking the sequence.
It would be nice to be able to see the function... (10 Replies)
Discussion started by: annacreek
10 Replies
2. Shell Programming and Scripting
I'm trying to call some functions in the background so that I can multitask in this script. Not working so hot. The functions I call don't ever seem to get called. I'm doing it the exact same way in another script and it's working like a champ so I'm very confused. Here's a pretty simple repro:
... (7 Replies)
Discussion started by: stonkers
7 Replies
3. Shell Programming and Scripting
Hi all,
I have a moderate size (300 lines) BASH Shell script that performs various tasks on different source reports (CSV files). One of the tasks that it performs, is to use SED to replace 'non-conforming' titles with conformant ones. For example "How to format a RAW Report" needs to become... (3 Replies)
Discussion started by: richardsantink
3 Replies
4. Shell Programming and Scripting
I wrote a very simple script to understand how to call user-defined functions from within awk after reading this post.
function my_func_local {
echo "In func $1"
}
export -f my_func_local
echo $1 | awk -F"/" '{for (k=1;k<=NF;k++) {
if ($k == "a" ) {
system("my_local_func $k")
}
else{... (19 Replies)
Discussion started by: sreyan32
19 Replies
5. Shell Programming and Scripting
Hi,
I'm not a pro bashscript writer but I'm learning and want to learn about my mistakes.
In the next script I have an error on rule 6 but I can't find what I'm doing wrong ...
I daily receive a file xml.xml and have to import it in an mysql database in a few existing tables.
#!/bin/bash... (2 Replies)
Discussion started by: garf0r
2 Replies
6. Shell Programming and Scripting
I have a bash script with some functions as below and am wondering if I can use the variables declared in setup in the other functions and in the rest of the bash script.
setup(){
none=0; low=1; medium=2; high=3; debug=4
var1="red"
var2="fred"
}
create_basemap() {
... (7 Replies)
Discussion started by: kristinu
7 Replies
7. Shell Programming and Scripting
Hi All, In my account with csh shell, there are lots of env variables set and I want to import those all to bash in one stroke, is there any way to do it ? Thanks, D (1 Reply)
Discussion started by: Deei
1 Replies
8. Shell Programming and Scripting
Hey, I'm new here. Basically, I'm trying to make a bash script that affects a file of my choice.
What I want to do is $./script.sh /path/to/file.jpg and then the bash script will know that variable=/path/to/file.jpg
Thanks! (4 Replies)
Discussion started by: TFB
4 Replies
9. Shell Programming and Scripting
This script is called fuu;
#!/bin/bash
speak() {
case $1 in
1)echo one
;;
2)echo two
;;
3)echo three
;;
esac
}
speak
exit 0
when i run fuu 2 i expect "two" like... (2 Replies)
Discussion started by: Tártaro
2 Replies
10. Shell Programming and Scripting
I'm trying to get awk to do arithmetic functions with external variables and I'm getting an error that I cannot figure out how to fix.
Insight would be appreciated
money=$1
rate1=$(awk -F"\t " '/'$converting'/{print $3}' convert.table)
rate2=$(awk -F"\t"... (2 Replies)
Discussion started by: DKNUCKLES
2 Replies