08-02-2012
Sorry for the late replay I am held up on other job. Thanks for your replay. The script work fine I made a fault on input file.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Guys,
I have a scripts that uses a while loop to read a file and set 2 variables.
How can I do this so the variables can be used outside the while loop ?
Below is an example....# ./junk2 -m -e user
EXE=user master=TRUE
DB_TAG=PRODUCT
In loop MST=MST=testsvr1:3110
In loop ARGS=... (2 Replies)
Discussion started by: Tornado
2 Replies
2. Shell Programming and Scripting
Sorry for such a dreadful title, but I'm not sure how to be more descriptive. I'm hoping some of the more gurutastic out there can take a look at a solution I came up with to a problem, and advice if there are better ways to have gone about it.
To make a long story short around 20K pieces of... (2 Replies)
Discussion started by: DeCoTwc
2 Replies
3. Shell Programming and Scripting
I'm trying to understand if it's possible to create a set of variables that are numbered based on another variable (using eval) in a loop, and then call on it before the loop ends.
As an example I've written a script called question (The fist command is to show what is the contents of the... (2 Replies)
Discussion started by: DeCoTwc
2 Replies
4. Shell Programming and Scripting
Hi, say I have a simple sh script like this:
for i in a b c d
do
for j in 1 2 3 4
do
echo "$i $j"
done
done
and the output is
a 1
a 2
a 3
a 4
b 1 (20 Replies)
Discussion started by: marcpascual
20 Replies
5. Shell Programming and Scripting
Can we assign two variables in a for loop?
I have an input file:
000301|20100502
835101|20100502
I want to read this file in a for loop and assign values to two different variables.
I did this now but did not work
for STORE,RUNDATE in `awk -F\| '{print $1,$2}' inputfile
... (4 Replies)
Discussion started by: gpaulose
4 Replies
6. Shell Programming and Scripting
Hi,
I need help on for loop need to add domain and IP
In domain list
1.com
2.com
3.com
In Ip list
1.1.0.1
1.2.0.1
1.3.0.1
1.com 1.1.0.1
2.com 1.2.0.1
3.com 1.3.0.1
I need to excute this command (4 Replies)
Discussion started by: ranjancom2000
4 Replies
7. Shell Programming and Scripting
Greetings. I'm completely new to shell scripting and quickly trying to catch on. Here's my scenario:
I have a text file, named ip.txt, containing IP addresses. I want to automatically perform a whois query on each address in the file, search the output for the country, and then put both the IP... (4 Replies)
Discussion started by: molnir
4 Replies
8. Shell Programming and Scripting
i am having a file contants as below
my requirement is
for file in `awk -F "," '{print $8,$9}'` <temp.txt
echo "$file"
echo "$file">test.txt
a=`awk -F "," '{print $1}' `<test.txt
b=`awk -F "," '{print $2}' `<test.txt
but script reads , i want both the vales for further... (5 Replies)
Discussion started by: sagar_1986
5 Replies
9. Shell Programming and Scripting
I am pretty new to Unix. Trying to pick up some slack while a coworker is out on vacation.
Basically the script is working fine however when I go through the testing phase and have to make mods it is a pita.
Here is an example of what I have
#!/bin/ksh
if
then
echo... (8 Replies)
Discussion started by: biobill
8 Replies
10. Shell Programming and Scripting
Hello, please assist:
users="test1 test2"
keytest1="abcd"
keytest2="dbcd"
for i in $users
do
echo "$key${i}" > fileout
done
So, my objective is to take the current user (ie test1) in loop and echo its associated keyname (ie keytest1) variable to a file.
The echo... (2 Replies)
Discussion started by: motdman
2 Replies
LEARN ABOUT DEBIAN
osd_cat
XOSD(1) General Commands Manual XOSD(1)
NAME
osd_cat - X on-screen file displayer
SYNOPSIS
osd_cat [OPTION] [FILE]...
osd_cat -b percentage|slider [OPTION]
DESCRIPTION
Display FILE, or standard input, on X screen.
-p, --pos=POS
This option tells osd_cat where to display the text. POS can be top, middle, or bottom. The default is top.
-o, --offset=OFFSET
This option specifies the offset from the top or bottom of screen the text is displayed. The default is 0.
-A, --align=ALIGN
This option tells osd_cat where to display the text. ALIGN can be left, right or center. The default is left.
-i, --indent=OFFSET
This option specifies the INDENT from the left of screen the text is displayed. The default is 0.
-f, --font=FONT
This option specifies the FONT to be used for displaying the text. The default is fixed.
-c, --color=COLOR
This option specifies the COLOR to be used for displaying the text. The default is red.
-d, --delay=TIME
This option specifies the number of seconds the text is displayed. The default is 5 seconds.
-l, --lines=LINES
This option specifies the number of LINES to scroll the display over. The default is 5.
-s, --shadow=OFFSET
This option specifies the OFFSET of the text shadow. The default is 0, which means no text shadow is created.
-S, --shadowcolour=COLOUR
This option specifies the COLOUR of the text shadow. The default is black.
-O, --outline=WIDTH
This option specifies the WIDTH of the text outline. The default is 0, which is no outline.
-u, --outlinecolour=COLOUR
This option specifies the COLOUR of the text outline. The default is black.
-a, --age[=SCROLL_AGE]
This option affects screen redrawing. If SCROLL_AGE seconds pass before a new line is ready (for example, you're reading from a
pipe), all lines are cleared at once instead of being scrolled off as new lines replace old lines. The default is 0.
When no SCROLL_AGE is explicitly given, the current value from DELAY is used.
-w, --wait
This option also affects screen redrawing. When there is data ready to be put on screen, this option will cause osd_cat to wait
until the display is clear. An alternative to scrolling.
-b, --barmode=TYPE
Lets you display a percentage or slider bar instead of just text. TYPE may be percentage or slider. In this mode no text is read
from any file, but the following options can be used:
-P, --percentage=PERCENTAGE
This option specified the position of the percentage / slider bar. PERCENTAGE may be in the range from 0 to 100, the default is 50.
-T, --text=TEXT
This option specifies an optional TEXT which gets displayed above the percentage bar. The default is empty, so no additional text
is displayed.
-h, --help
display help (which is often more up to date) and exit
With no FILE, or when FILE is -, read standard input.
AUTHOR
Martijn van de Streek <martijn@foodfight.org>, Some patching done by Malcolm Valentine <farkit@iprimus.com.au> and Tim Wright
<tim@ignavus.net>.
xosd was written by Andre Renaud <andre@ignavus.net> and is maintained by Tim Wright <tim@ignavus.net>
SEE ALSO
More information on the X OSD Library and its author can be found on http://www.ignavus.net/software.html
<http://www.ignavus.net/software.html>
COPYRIGHT
It is distributed under the GNU General Public License.
X OSD cat January 2001 XOSD(1)