10 More Discussions You Might Find Interesting
1. Debian
Hi Guys
I have another problem I'm trying to solve and hope that some one can help me here.
This is the scenario:
I have a file and I want to add a line on the 3rd line of the file using a bash script. but instead its adding the the bash variable $WEBSITE.
Below is the bash script I'm... (6 Replies)
Discussion started by: linuxjunkie
6 Replies
2. Shell Programming and Scripting
Trying to do so
echo "111:222:333" |awk -F: '{system("export TESTO=" $2)}'But it doesn't work (2 Replies)
Discussion started by: urello
2 Replies
3. Shell Programming and Scripting
I was wondering if anyone could provide some assistance. I trying to run an expect script within bash and get the results of a variable called RESULT. I Have tried a few things but none of them have worked. I know that the child process (the expect script) in this instance cannot set a variable... (6 Replies)
Discussion started by: ylafont
6 Replies
4. Shell Programming and Scripting
Sometimes it is handy to protect long scripts in C++.
The following syntax works fine for simple commands:
#define SHELLSCRIPT1 "\
#/bin/bash \n\
echo \"hello\" \n\
"
int main ()
{
cout <<system(SHELLSCRIPT1);
return 0;
}
Unfortunately for there are problems for:
1d arrays:... (10 Replies)
Discussion started by: frad
10 Replies
5. 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
6. Shell Programming and Scripting
Hello,
I've spent hours this morning reading various past forum posts and documentation pages but I can't find exactly what I need.
I'm trying to call a variable with a variable in the name without having to make a third variable.
For example:
path=AB
legAB=50
leg$path
I want to... (8 Replies)
Discussion started by: DFr0st
8 Replies
7. Shell Programming and Scripting
I am writing some scripts using bash and am wondering if there is a better way to perform the following set of formatting variables.
s1=" "
s2=" "
s3=" "
s4=" "
s5=" "
s6=" "
s7=" "
s8=" "
frmt_titl="${bYl}%s${nClor}\n"
frmt1_titl="${s1}$frmt_titl"... (10 Replies)
Discussion started by: kristinu
10 Replies
8. Shell Programming and Scripting
Hi,
This is probably going to be very simple but i came across something i can't quite explain. Here is the situation: i have a list of files, which i'd like to process one by one (get the size, make some tests, whatever) and generate some statistics using different variables.
Something... (5 Replies)
Discussion started by: m69w
5 Replies
9. Shell Programming and Scripting
I have some troubles with variables and quotes...
I want:
if $URL is empty (no user input) go to http://www.localhost/index.php/ else add this string (search) "?s=+$URL"
EXAMPLE:
No user input
string= http://www.localhost/index.php/
User input = "unix"
string=... (3 Replies)
Discussion started by: aspire
3 Replies
10. UNIX for Dummies Questions & Answers
Hi everyone,
I have added this to my .bash_profile. Whenever I log in and when I type javac I get a error message (java: command not found). Does the order counts?
PATH=$JAVA_HOME/bin:$PATH:$HOME/bin
JAVA_HOME=$JAVA_HOME/usr/local/jdk1.3.1_02
export JAVA_HOME PATH
Thanks
ny (3 Replies)
Discussion started by: xNYx
3 Replies