10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to write a shell script which takes an input file as an arguement in the terminal e.g. bash shellscriptname.sh input.txt. I would like for the file to be read line by line each time checking if the .txt file contains certain words or letters(validating the syntax). If the line being... (1 Reply)
Discussion started by: Gurdza32
1 Replies
2. Shell Programming and Scripting
Hi,
Here is the output of lpstat. I would like to read value of Queue which is(abxxxxb1)and status that is DOWN in first line. i dont care what is in second line. any one can help me.thanks
Queue Dev Status Job Files User PP % Blks Cp Rnk
------- ----- ---------... (5 Replies)
Discussion started by: sagii
5 Replies
3. Shell Programming and Scripting
OK so my objective is to create a python program that will parse an XML file(input.xml), then the program will create an mxml(output.mxml) file.
In the program (.py) i need to read between CDATA so that I would get an output the CDATA code in the input.xml
INPUT.XML
<!]>
... (2 Replies)
Discussion started by: dcfivesixfive
2 Replies
4. UNIX for Dummies Questions & Answers
hi all,
i want use the variable value as a new variable name. print output of new variable.
for i in COMPUTER1 COMPUTER2
do
flag_name=${i}_FLAG
eval ${flag_name}=123
echo $i'_FLAG'
done
output is
COMPUTER1_FLAG
COMPUTER2_FLAG
i need output as
123
123 (2 Replies)
Discussion started by: arvindng
2 Replies
5. Shell Programming and Scripting
All Expert,
I am using Sun OS 5.8 and Perl version 5 in One server and Perl 5.8 in another unix server.
I am able to read a file using fopen function of perl --file size having more then 3 GB of data.(In the machine where Perl 5.8 install)
But when i am running the same perl script --It... (1 Reply)
Discussion started by: jambesh
1 Replies
6. UNIX for Advanced & Expert Users
Hi everyone,
I do have the requirement to store the value of below result in a variable
eval echo $a
Please .... Help me , it's urgent to my sript
Thanks in advance... (1 Reply)
Discussion started by: kaaakrishna
1 Replies
7. Shell Programming and Scripting
Hi All,
I need urgent help. Because just now i have to give this code to my client.
I have a folder name is Testing. this Testing folder contains the following 3 files.
1.txt
2.txt
2.txt
Now I want to store the first value of my folder in a variable say suppose $a.
Means i want that... (3 Replies)
Discussion started by: sunitachoudhury
3 Replies
8. Shell Programming and Scripting
Hi,
I am new to shell scripting.
I have one .txt file whose name is status.txt
Now i want to read the contents of this file in a variable.
status.txt file contains the following input
1.xml
2.ps
3.pdf
now i want to read this status.txt file. Can anybody please help me to write a... (2 Replies)
Discussion started by: sunitachoudhury
2 Replies
9. Shell Programming and Scripting
I'm trying to make changes in a file using the following bash script:
#!/bin/bash
MYHOME=`echo $HOME`
README=$MYHOME"/environment"
IAM=`whoami`
CHANGEPATHLIST="TALOG TACONFIG TAINFO TAWORK TMPSPACE"
for var in $CHANGEPATHLIST
do
perl -pi -e 's/sacuser1/$IAM/ if m/$var/' $README... (3 Replies)
Discussion started by: yoonixq4u
3 Replies
10. Shell Programming and Scripting
I am extracting directory path from file which is stored in a variable.
while read inputline
do
script_name=`echo $inputline | cut -d' ' -f2`
cd $script_name
done < path_scripts.txt
where as path_scripts contains
input_process.bash ~/jobs/process/input/bin
The script output says... (1 Reply)
Discussion started by: jacksam007
1 Replies