10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
I have a source config file with variables like so:
eth1_ip=192.168.1.99
eth2_ip=192.168.1.123
eth3_ip=172.16.1.1
I am trying to run a script which loops based on the number of eth interfaces on a machine and therefore modifies the variable it calls in the environment based on the... (5 Replies)
Discussion started by: landossa
5 Replies
2. Shell Programming and Scripting
I have a requirement to send a trigger file (trigger_dayn.dat) to a remote server through the FTP
trigger_dayn.dat - here the dayn is the day number. However the dayn is not sysdate.
day 1 is from Monday 07:00.00 AM to Tuesday 06:59:59 AM and so on. So if the trigger file is generated say... (1 Reply)
Discussion started by: k_vikash
1 Replies
3. Shell Programming and Scripting
Hi all,
I couldn't find an answer for this easy question, probably because the keywords I used in the search are too generic.
I just want to make a list of numbers using the value of a variable, like this:
NumFiles=$(ls | wc -l)
for i in {1..$NumFiles}; do
Say $NumFiles = 5. Bash... (3 Replies)
Discussion started by: Aquila
3 Replies
4. Shell Programming and Scripting
Hello.
I've written up a script, that populates a variable with a list of tapes returned from my library. For example:
701940L3,701941L3,701942L3,701943L3,701944L3,701945L3,701946L3,701947L3,701948L3
So now, the variable "TAPELIST" contains those numbers, delimited by commas. I'd like to... (6 Replies)
Discussion started by: Stephan
6 Replies
5. Shell Programming and Scripting
Hey all,
I am parsing a file which have records containing one of a number of files names:
".psd", ".cr2", ".crw" , ".cr", ".xi", ".jpg", ".xif" etc
Somewhere on each line there is a value "Namex.psd" "Namex.crw" etc. The position of this name is highly variable
I need to output all the ".psd"... (4 Replies)
Discussion started by: C0ppert0p
4 Replies
6. Shell Programming and Scripting
Hi all,
I have a variable say var1 (output from somewhere, which I can't change)which store something like this:
echo $var1
name=fred
age=25
address="123 abc"
password=pass1234
how can I make the variable $name, $age, $address and $password contain the info?
I mean do this in a... (1 Reply)
Discussion started by: freddy1228
1 Replies
7. Programming
hello
I have this code
#include <sys/types.h>
#include <unistd.h>
#include <iostream>
#include <pthread.h>
#include<cstring>
using namespace std;
int var1=0;
void doSomething()
{
var1 = 5;
cout<<"Do S :"<<var1<<endl;
sleep(1);
var1 =7; (4 Replies)
Discussion started by: vip_a1
4 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have say two programs
File1:
echo Enter A's Value
read A
export A
File2:
while
do
echo $A
sleep 5
done (1 Reply)
Discussion started by: pbsrinivas
1 Replies
9. Shell Programming and Scripting
Hello all,
I need to create a variable that contains a path to a program. I'd like to reference that variable later in the script to execute the program. Does anyone have any ideas how I can accomplish this?
Thanks,
Mark :) (2 Replies)
Discussion started by: mmignot
2 Replies
10. Shell Programming and Scripting
I tried creating a variable with the awk command. The correct value is being printed to the screen; however, the variable max is not being set. The command "echo $max" is null. Any help would be greatly appreciated. Thank you.
cat test.txt:
-rw-r--r-- 1 root root 0 2005-01-12 20:51... (2 Replies)
Discussion started by: cstovall
2 Replies