what can be used instead of sed, as i dont know anything about sed and rather learn shell scripting first and then look at sed, also just so i can understand this better, the random word file, needs to one word per line and numbered for this to work??
You are a star
Keyvan
Last edited by keyvan; 05-24-2007 at 09:25 AM..
Reason: more information
Hello, I am very new to shell scripting. This problem seems quite easy so it should be quite easy (I hope ^^)
I want to get a random file from a directory. this file will be in one subdirectory, and it will contain spaces.
code I have got so far:
N=find ./*/*.jpg | wc -l
((N=RANDOM%N))
... (6 Replies)
I need to use the $RANDOM command to get a line from a list of lines in a file randomly.
file is
help
go
three
house
film
how do i randomly get one word without looking into the file? (6 Replies)
Hi there folks,
for an exercise for my pupils (you know i am always thinking of them!) i need to randomly re-arrange the words (blank space separated) in a sentence (a line in a textfile). Any inspiration??
Txk so much. (9 Replies)
Hi
I am new to expect. Please if any one can help on my issue its really appreciable. here is my issue:
I want expect script for random passwords and random commands generation.
please can anyone help me?
Many Thanks in advance (0 Replies)
Over the last month or so my CentOS server has been crashing for reasons I do not know. It has been running for over a year with regular yum updates without problems. The load on the server is perfectly normal with CPU usage at 5-6% and RAM usage at less than half of 32GB of RAM (multiple smaller... (3 Replies)
Hi,
Could you please let me know what the following code does, I know that it means generating random numbers, however not sure what is the entire purpose.
R=$(($RANDOM % 2))
delay=$(($RANDOM % 10))
if
then
TEXT='X'
else
... (3 Replies)
Need to use dd to generate a large file from a sample file of random data. This is because I don't have /dev/urandom.
I create a named pipe then:
dd if=mynamed.fifo do=myfile.fifo bs=1024 count=1024
but when I cat a file to the fifo that's 1024 random bytes:
cat randomfile.txt >... (7 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
Write a shell script that will take the sum of two random number?
Ex: Random n1 +Random n2 = result
i tries to write it but i had some dufficulties
... (3 Replies)
Discussion started by: renegade755
3 Replies
LEARN ABOUT OSF1
xmscrollvisible
XmScrollVisible(3X)XmScrollVisible(3X)NAME
XmScrollVisible - A ScrolledWindow function that makes an invisible descendant of a ScrolledWindow work area visible
SYNOPSIS
#include <Xm/ScrolledW.h>
void XmScrollVisible (scrollw_widget, widget, left_right_margin, top_bottom_margin)
Widget scrollw_widget;
Widget widget;
Dimension left_right_margin;
Dimension top_bottom_margin;
DESCRIPTION
XmScrollVisible makes an obscured or partially obscured widget or gadget descendant of a ScrolledWindow work area visible. The function
repositions the work area and sets the specified margins between the widget and the nearest viewport boundary. The widget's location rela-
tive to the viewport determines whether one or both of the margins must be adjusted. This function requires that the XmNscrollingPolicy of
the ScrolledWindow widget be set to XmAUTOMATIC. Specifies the ID of the ScrolledWindow widget whose work area window contains an obscured
descendant. Specifies the ID of the widget to be made visible. Specifies the margin to establish between the left or right edge of the
widget and the associated edge of the viewport. This margin is established only if the widget must be moved horizontally to make it visi-
ble. Specifies the margin to establish between the top or bottom edge of the widget and the associated edge of the viewport. This margin
is established only if the widget must be moved vertically to make it visible.
For a complete definition of ScrolledWindow and its associated resources, see XmScrolledWindow(3X).
SEE ALSO XmScrolledWindow(3X)XmScrollVisible(3X)