Hi,
I have some problem in assigning values to variables: This is what Iam literally doing:
i=0
input=test
temp$i = $input
In the sense, I try to assign the value in the variable input (ie., test) to another variable temp0 (since i is assigned 0, temp$i is temp0). Seems simple, but I get... (3 Replies)
Hi,
I'm trying to assign the permissions, owner and group of a file to seperate variables, but using
ls -l filename | awk '{print $1 "\t" $3 "\t" $4}'
gives the owner as tom.ja instead of tom.james
Is there any way to expand it so i get the full name, or is there an easier way to get them... (5 Replies)
HI
I have something like this in a file
ABC = 1
DEF = 2
GHI = 3
JKL = 4
MNO = 5
QRS = 6
TUV = 7
I need to assign ABC to V_abc (that is to a variable)
GHI to V_ghi (that is to another variable)
TUV to say V_tuv
... (6 Replies)
How do I assign values to reference variables?
I am assigning a variable name to --> $user_var
Then I am trying to change its underlying variable value by
$((user_var))=$user_value .. its failing,,
Please let me know if there is a way to do this dynamically..
FileA.props... (5 Replies)
I am looking to create a perl script which will take numbers from a simple text file, convert them from decimal to hex, and then rewrite those values in the file or create a new file with the hex numbers(whichever's easier).
My text document for example would be something as simple as
1312... (6 Replies)
I have a file that has four values on each line and I'd like to give each column a variable name and then use those values in each step of a loop. In bash, I believe you could use a while loop to do this or possibly a cat command, but I am super new to programming and I'm having trouble decoding... (2 Replies)
Hi All,
Is it possible to grep for two files and assign their names to two separate variables with for loop? I am doing the below currently:
if
then
for fname in $( cd $dirA ; ls -tr | grep "^Ucountry_file$")
do
InFile=$dirA/$fname
... (4 Replies)
I have a file containing multiple values, some of them are pipe separated which are to be read as separate values and some of them are single value all are these need to store in variables.
I need to read this file which is an input to my script
Config.txt
file name, first path, second... (7 Replies)
So first: Sorry if the title is confusing...
I have a script I'm writing with a file with several names in it (some other info - but it's not really pertinent...) - I want to be allow the user to delete certain records, but I ran into a problem I'm not sure how to go about fixing.
If I were... (6 Replies)
Discussion started by: sabster
6 Replies
LEARN ABOUT DEBIAN
envstore
ENVSTORE(1) BSD General Commands Manual ENVSTORE(1)NAME
envstore -- save and restore environment variables
SYNOPSIS
envstore command [args ...]
DESCRIPTION
envstore can save and restore environment variables, thus transferring them between different shells.
command must be one of
clear
Forget all stored variables
eval
Produce shell code for evaluation, restoring all saved variables
list
List saved variables in better readable format
save variable [value]
Save variable either with its current shell value or with value
rm variable
Remove variable from store
Note: Only the first character of command is checked, so envstore e instead of envstore eval, envstore c for envstore clear, etc., are also
valid.
ENVIRONMENT
ENVSTORE_FILE The file in which the environment parameters are stored, /tmp/envstore-EUID by default,
LIMITATIONS
Variable names or values must not contain null bytes or newlines.
Due to limitations imposed by most shells, it is not possible to save parameters containing more than one consecutive whitespace. envstore
will save and display them correctly, but unless you do IFS trickery, your shell will not be able to load them.
The current maximum length (in bytes) is 255 bytes for the variable name and 1023 bytes for its content.
AUTHOR
envstore was written by Daniel Friesel <derf@derf.homelinux.org>.
Original idea and script by Maximilian Gass <mxey@ghosthacking.net>.
SEE ALSO envify(1)BSD December 1, 2009 BSD