Search Results

Search: Posts Made By: svetoslav_sj
2,187
Posted By svetoslav_sj
I found an easy on in case someone needs it sed...
I found an easy on in case someone needs it
sed -n '/TO=/ s///p' script

Seems to work perfectly :)
2,187
Posted By svetoslav_sj
Print part of string
I have a file called file.txt
It contains strings:

ALT=someone@acme.com
TO=whoever@lalalulu.com

How could find and print the actual address after the = sign for any given instance? I need the...
9,038
Posted By svetoslav_sj
Yes something like that, only that...
Yes something like that,
only that withsomething can be different as it is a value from the last input....
So it has to look for a way to identify and replace it
9,038
Posted By svetoslav_sj
Thanks but short answer is no :) I...
Thanks
but short answer is no :)
I definitely need command from one script to affect variable value in another one. At least for my task...
9,038
Posted By svetoslav_sj
Find a variable in a file and replace its value
HI ,
I can't find a solution to the following:

In a simple menu script I want to capture the input from the user with "read" and use it as a value in a variable Rempages="some_value" which is in...
2,405
Posted By svetoslav_sj
so that's what happens I enter: echo...
so that's what happens
I enter:

echo "Please enter a valid network adress (e.g 129.168.0.0/24)" ; read network;\
if [ `echo "$network" | awk '{print length($0)}'` -eq 14 ] ;\
...
2,405
Posted By svetoslav_sj
You may be right. But how do I do that? My...
You may be right. But how do I do that?

My Main Menu script is in one file that I execute first to define the values which are then inserted and the variable in the other file

What is the...
2,405
Posted By svetoslav_sj
A long script I have IP="address" as a...
A long script

I have
IP="address" as a variable on the 4-th line

The point is to be able to take user's input for IP address and insert it into this file so it is a valid IP to be used...
2,405
Posted By svetoslav_sj
Take input from read and place it a string in another file
Hi,
This is most likely a dumb question but I could not find answer to it elsewhere.

I'm building a simple menu with case /esac and want to read user's input:

Please enter XYZ ; read XYZ
...
1,396
Posted By svetoslav_sj
I think it is my fault not explaining myself very...
I think it is my fault not explaining myself very well.
The file name should be different but from a range of predefined values.

As an example the filenames may be contained in another file and...
1,396
Posted By svetoslav_sj
Unfortunately it does not support it...
Unfortunately it does not support it...
1,396
Posted By svetoslav_sj
while statement problem
Hi,
Here is a big head scratcher for me....

I'm creating a loop with while reading lines from a file called example.txt:

#!/bin/sh

while read line
do
some command > another file ...
2,021
Posted By svetoslav_sj
Thanks a lot. That works!
Thanks a lot. That works!
2,021
Posted By svetoslav_sj
Issues when dividing
Hi,
I do have a very simple task to divide 2 variables and display the result.
I CANNOT use bc
when i try
var1=2
var2=4
var3=$(($var1 / $var2))
echo $var3

the output is always 0
What...
Forum: UNIX and Linux Applications 01-23-2012
2,282
Posted By svetoslav_sj
Thanx!
Great guys! It works just right!

If it's not too much to ask - is there a way to output the result on the same line:
not like
192.168.0.1
"result from command"

but as 192.168.0.1 "result of...
Forum: UNIX and Linux Applications 01-23-2012
2,282
Posted By svetoslav_sj
display which line returns specific output
Hi,
I'm trying to figure out a way to find which line in my file.txt with IP addresses:

192.168.0.1
192.178.0.2
etc...

returns specific result when I execute command affecting all lines. ...
Showing results 1 to 16 of 16

 
All times are GMT -4. The time now is 06:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy