10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a file service.xml which has following content:
<?xml version="1.0" encoding="UTF-8"?>
<Service Ver="2.31.13"/>
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 Replies
2. Shell Programming and Scripting
I have a input file like this.
Sample.txt
30 | TXDatacenter | TXBackupDC
10 | UKDatacenter | UKBackupDC
0 | NLDatacenter | NLBackupDC
......
......
......
I need to get these values in different variables like this.
Load1=30
PriCenter1=TXDatacenter... (5 Replies)
Discussion started by: Visha
5 Replies
3. Shell Programming and Scripting
Hi, I'm trying to store the output from a grep, I just want the file name.
But couldn't find how to do it.
Basically, I just want to grep <etc> * and I want to store the file name.
There is only one file with the what I'm grepping, so storing in a variable o an array its the same.
If someone... (3 Replies)
Discussion started by: radicaled
3 Replies
4. Shell Programming and Scripting
hello
i have two files
temp.txt
and temp_unique.text
the second file consists the unique fields from the temp.txt file
the strings stored are in the following form
4,4
17,12
15,65
4,4
14,41
15,65
65,89
1254,1298i'm able to run the following script to get the total count of a... (3 Replies)
Discussion started by: vaibhavkorde
3 Replies
5. Shell Programming and Scripting
Hi Gurus,
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:
#!/bin/ksh
while read line
do
id=`echo $line | cut -f1 -d |`
name=`echo $line | cut -f2 -d |`
echo $id
... (11 Replies)
Discussion started by: svajhala
11 Replies
6. UNIX for Dummies Questions & Answers
Hi,
How to read a file and put the values in a script. E.g.
file1.txt
02/12/2009;t1;t2
The script should read this file and put these values in 3 different variables x1,x2,x3 which can be used further.
Thanks
Ashu (3 Replies)
Discussion started by: er_ashu
3 Replies
7. UNIX for Dummies Questions & Answers
I know there are caveats about using read in pipelines because read is treated by a subshell. I know this but I can't think of any way to accomplish this regardless, I'm still a rookie.
I hope somebody will be able to interpret what it is that I'm trying to accomplish and correct me.
... (2 Replies)
Discussion started by: ProGrammar
2 Replies
8. Shell Programming and Scripting
hi,
I am a begginer in unix and i want to know how to open a file and read it and separate the numbers & words and storing it in separate files, Using shell scripting.
Please help me out for this.
Regards
S.Kamakshi (2 Replies)
Discussion started by: kamakshi s
2 Replies
9. UNIX for Dummies Questions & Answers
Hi all,
I'm quite new to unix and hope that someone can help me on this.
I'm using csh.
Below is what i intend to do.
1. I stored some data in a file.
2. I intend to read the file line by line and store each line of data into a variable, so that i can used it later.
Anyone have any... (4 Replies)
Discussion started by: seijihiko
4 Replies
10. UNIX for Advanced & Expert Users
Dear friends,
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
7 Replies