10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Daily I am generating a file dfm_daily_file_
ex: dfm_daily_file_05072015 date will be changed daily.
Once the file is FTP it is deleted.
I have tried the below code to get the file name with any date and store it in a variable its not working.
#!/bin/ksh ... (4 Replies)
Discussion started by: ROCK_PLSQL
2. Shell Programming and Scripting
I have a file service.xml which has following content:
<?xml version="1.0" encoding="UTF-8"?>
I want to read the value of Ver (that is 2.31.13) and assign to a variable which i further use.
Please help me in that. (3 Replies)
Discussion started by: laxmikant15
3. Shell Programming and Scripting
I've a file ImageSizeDetails.txt with the following contents:
Image Name: swncd 01.10.00.04
Created: Wed Jan 9 14:05:48 2013
Image Type: ARM Linux Multi-File Image (gzip compressed)
Data Size: 7351011 Bytes = 7178.72 kB = 7.01 MB
Load Address: 00008000
Entry Point: ... (6 Replies)
Discussion started by: Parameswaran
4. Shell Programming and Scripting
How to use a variable to store the filename of a file which was found by the 'find' command.
can this be practical-->var = find . -name "filename.dat"
Please help.. (1 Reply)
Discussion started by: ayyappaas
5. Shell Programming and Scripting
I am trying for a scenario where in I want to read the contents of a file line by line and then store them in variables. Below is the script:
while read line
id=`echo $line | cut -f1 -d |`
name=`echo $line | cut -f2 -d |`
... (11 Replies)
Discussion started by: svajhala
6. UNIX for Dummies Questions & Answers
How to read a file and put the values in a script. E.g.
The script should read this file and put these values in 3 different variables x1,x2,x3 which can be used further.
Ashu (3 Replies)
Discussion started by: er_ashu
7. Shell Programming and Scripting
Hello, Would someone guide me on how to write a shell script the would search for a phone no using at the end text file using sed or awk and store it in a varaible or print it.
The text file is in this form
text or numbers in first line
text or numbers in second line
Firsname... (6 Replies)
Discussion started by: amuthiga
8. Shell Programming and Scripting
i have to store the files in a folder and assign a variable to the the files. (0 Replies)
Discussion started by: dineshr85
9. UNIX for Dummies Questions & Answers
I have a file with some values in a tab delimted format
now i need to capture this value 'Trk_12345678' into a variable say 'x' and append that value of 12345678 to 12345679 and store is back to a new 'test1' file as :
'test1'... (11 Replies)
Discussion started by: shiroh_1982
10. UNIX for Advanced & Expert Users
i am writing csh script
i have one dat file containing following data.like this.
08FD3 03A26 000FA0 FFFF0 BBA0F 00000 00000
from the above file i want to read each letter and store it in one variable.
how it is possible.
please help (7 Replies)
Discussion started by: rajan_ka1
ENVSTORE(1) BSD General Commands Manual ENVSTORE(1)
envstore -- save and restore environment variables
envstore command [args ...]
envstore can save and restore environment variables, thus transferring them between different shells.
command must be one of
Forget all stored variables
Produce shell code for evaluation, restoring all saved variables
List saved variables in better readable format
save variable [value]
Save variable either with its current shell value or with value
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
ENVSTORE_FILE The file in which the environment parameters are stored, /tmp/envstore-EUID by default,
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.
envstore was written by Daniel Friesel <email@example.com>.
Original idea and script by Maximilian Gass <firstname.lastname@example.org>.
December 1, 2009 BSD