10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I have been trying to figure a way to copy a file, (a template), that has internal variables. Using the values as defined for those variables in another script.
So a file called x -
#! /bin/bash
D=aa.$X.bb
And file y
#! /bin/bash
X=6
while read line
do
eval echo... (5 Replies)
Discussion started by: steadyonabix
5 Replies
2. UNIX for Dummies Questions & Answers
In BASH, how does ||: get interpreted. I know || is logical or. And I believe : evaluates to true. Can someone give a thorough explanation for this usage?
Example
for i in $IGGY
do
&& skipdb=1 || : (6 Replies)
Discussion started by: glev2005
6 Replies
3. Shell Programming and Scripting
Hello guys,
I'm trying to extract all the expressions between the following tags: <b></b> from a HTML file.
This is how it looks: big lines containing several dozens expressions (made of 1,2,3,4,6 or even 7 words) I would like to extract:
<b>bla ble</b>bla ble</td><tr valign="top"><td... (3 Replies)
Discussion started by: bobylapointe
3 Replies
4. UNIX for Dummies Questions & Answers
Hi all,
I have a flat file as below;
470423495|1||TSA-A000073800||1|||1
471423495|1||TSA-A000073800||5|||5
472423495|1||TSA-A000073800||2|||7
473423495|1||TSA-A000073800||3|||3
I like to create a Unix script.
The script have to valuate the last two columns, if the values are... (4 Replies)
Discussion started by: mrreds
4 Replies
5. Shell Programming and Scripting
How to evaluate the value of a variable ?
For example:
a=var
$a=value !!!error happens!!!
I want to evaluate var=value, how to realize it?
Thanks!
---------- Post updated at 03:37 AM ---------- Previous update was at 02:22 AM ----------
I am using linux bash.
a=var
$a=value... (4 Replies)
Discussion started by: 915086731
4 Replies
6. Shell Programming and Scripting
Attached is the exact ouput of a vmware VDR log file I am working with but what I am trying to achieve is as follows:
I need to output sections of the file using the string "Normal backup" as the start and "Duration" as the end to seperate files so I can then manipulate them further to create... (2 Replies)
Discussion started by: jelloir
2 Replies
7. UNIX for Dummies Questions & Answers
I have a file with approximately 262,000 fields and I want to split it according to pairs of fields. The fields have headers and I want to create smaller files with just the columns between the fields (specified fields inclusive).
For example, I just want the columns "set" and "test", with the... (3 Replies)
Discussion started by: etownbetty
3 Replies
8. Shell Programming and Scripting
I have variables:
FOO="Text"
BAR="FOO"
I'd like to be able to evaluate the variable named as the value of $BAR.
echo $FOO
Text
echo $BAR
FOO
This is what I'd like to do:
echo ${$BAR} (this won't work)
Text (3 Replies)
Discussion started by: Ilja
3 Replies
9. Shell Programming and Scripting
Hi,
Could someone please help me with how to do the following?
Say I have a flat file test.lst and the content of the file is:
Report Date - `date '+%m%d%Y'`
I'm trying the following
while read myLine
do
echo ${myLine}
done<test.lst
This prints Report Date - `date... (1 Reply)
Discussion started by: arunsoman80
1 Replies
10. UNIX for Dummies Questions & Answers
I have a program that displays many messages on stdout.
I have another file that contain error messages only - Each line is a separate message. (msgs.txt)
I am trying to show only the errors and not all the output.
I tried this but got nothing:
myprog | grep < msgs.txt
I also tried... (2 Replies)
Discussion started by: GMMike
2 Replies