what is wrong here is that the ">" always overwrite the output file. use ">>" instead so it will append. make sure that the output file is blank before the start of the loop like:
Hello,
I have a cat.dat file, i would like shell to read each 3 lines and set this 3 lines to 3 different variables.
my cat.dat is:
11
12
+380486461001
12
13
+380486461002
13
14
+380486461003
i want shell to make a loop and assign 1st line to student_id, 2nd line to... (4 Replies)
Friends,
I have to execute a command and store its contents into an array using shell. this is what i have tried
#!/bin/bash
disk_names = ($(`iostat -xtc | egrep -v "device|nfs" | awk '{print $1}'| tr '\n' ' ' `))
But its throwing an error message as
./test-script
./test-script:... (6 Replies)
Hi,
I am writing a shell script where,
x=y
y=z
When I want to print z, I can do
$y
How do I use only "x" without any direct reference to "y" to print z?
Thanks,
-G (3 Replies)
Hi,
I have a text file with multiple lines, each having data in the below format
<DOB>,<ADDRESS>
I have to write a script which reads each line in the text file in loop, assign the values to these variables and do some further processing in it.
Using the following code prints the... (1 Reply)
Hi,
I have a text file with multiple lines, each having data in the below format <DOB>,<ADDRESS>
I have to write a script which reads each line in the text file in loop, assign the values to these variables and do some further processing in it.
Using the following code prints the values... (12 Replies)
Enclosed is comma separated text file. I need to write a korn shell program that will parse the text file and insert the values into Oracle database.
I need to write the korn shell program on Red Hat Enterprise Linux server.
Oracle database is 10g. (15 Replies)
Hello,
So I have approximately 300 files of raw data (.txt) files that I am using to perform statistical analysis. I have been able to construct a Fortran program that is able to perform my statistical analysis on a file by file basis.
However, I now want to be able to loop program through... (19 Replies)
Hi All,
I need small help on for loop syntax in C shell.
How can we read the values from a file (line by line) through C shell loop.
For Ex:
$Cat file1
data1
data2
data3
data4
$
I have to print those values in a variable and have to perform some steps...
Can anyone help on... (2 Replies)
hi guys, i want help... Reding XML file and print the values into the text file using linux shell script file as per below xml file
<sequence>
<Filename>aldorzum.doc</Filename>
<DivisionCode>US</DivisionCode>
<ContentType>Template</ContentType>
<ProductCode>VIMZIM</ProductCode>
</sequence>... (1 Reply)
Discussion started by: sravanreddy
1 Replies
LEARN ABOUT DEBIAN
sc_ally
SC_ALLY(1) BSD General Commands Manual SC_ALLY(1)NAME
sc_ally -- scamper driver to run Ally on a list of candidate aliases.
SYNOPSIS
sc_ally [-?D] [-i infile] [-o outfile] [-p port] [-U unix-socket] [-w waittime] [-q attempts] [-t logfile]
DESCRIPTION
The sc_ally utility provides the ability to connect to a running scamper(1) instance and have a set of IPv4 address-pairs testsed for aliases
using the Ally technique. For each address pair in the file, sc_ally establishes which probe methods (UDP, TCP-ack, ICMP-echo) solicit an
incrementing IP-ID value, and then uses the Ally technique on pairs where a probe method is able to obtain an incrementing IP-ID for both
addresses. The output is written to a warts file. The options are as follows:
-? prints a list of command line options and a synopsis of each.
-D causes sc_ally to detach and become a daemon.
-i infile
specifies the name of the input file which consists of a sequence of IPv4 address-pairs, one pair per line.
-o outfile
specifies the name of the output file to be written. The output file will use the warts format.
-p port
specifies the port on the local host where scamper(1) is accepting control socket connections.
-U unix-socket
specifies the name of a unix domain socket where scamper(1) is accepting control socket connections.
-w waittime
specifies the minimum length of time, in seconds, to wait between completing a measurement to a particular IP address and issuing the
next.
-q attempts
specifies the number of times to try Ally when one of the addresses is unresponsive.
-t logfile
specifies the name of a file to log output from sc_ally generated at run time.
EXAMPLE
Given a set of IPv4-address pairs in a file named infile.txt:
192.0.2.1 192.0.32.10
192.0.2.2 192.0.31.8
192.0.2.3 192.0.30.64
and a scamper(1) daemon listening on port 31337, then these address-pairs can be tested for aliases using
sc_ally -i infile.txt -o outfile.warts -p 31337
SEE ALSO
N. Spring, R. Mahajan, and D. Wetherall, Measuring ISP topologies with Rocketfuel, Proc. ACM SIGCOMM 2002. scamper(1), sc_wartsdump(1),
sc_warts2text(1)AUTHORS
sc_ally is written by Matthew Luckie <mjl@luckie.org.nz>.
BSD March 1, 2011 BSD