12-19-2013
Please show us your sample input and expected output.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
- I m retreving values from database and wish to use those values later in my shell script. I m placing these values in an array da_data but outside loop array is empty.Problem is its treating array as local inside loop hence array is empty outside loop.
Plz go through the script and suggest how... (1 Reply)
Discussion started by: Devesh5683
1 Replies
2. Shell Programming and Scripting
I need to do something like this:
for i in 1 2 3 4 5; do
arr=$(awk 'NR="$i" { print $2 }' file_with_5_records)
done
That is, parse a file and assign values to an array in an ascending order relative to the number of record in the file that is being processed on each loop.
Is my... (2 Replies)
Discussion started by: fiori_musicali
2 Replies
3. Shell Programming and Scripting
Hi everyone:)
I have 2 files - IN & OUT. Example:
IN
A:13:30
B:45:40
.
.
. UNLIMITED
OUT
Z:12:24
Y:20:15
.
.
. UNLIMITED
I want first row of numbers of IN - OUT. Example 13-12 45-20
My code is (2 Replies)
Discussion started by: vincyoxy
2 Replies
4. Shell Programming and Scripting
Have built this script, the output is what I needed, but NR 6 is omitted. Why? Is it an error? I am using Gawk.
'{nr=$2;f = $1} END{for (i=1;i<=f;i++) if (nr != i) print i, nr }' input1.csv >output1.csvinput1.csv
1 9
3 5
4 1
7 6
8 5
10 6
output1.csv > with the missing line number 6. 6 is... (5 Replies)
Discussion started by: sdf
5 Replies
5. Shell Programming and Scripting
Hello All,
Maybe I'm Missing something here but I have NOOO idea what the heck is going on with this....?
I have a Variable that contains a PATTERN of what I'm considering "Illegal Characters". So what I'm doing is looping
through a string containing some of these "Illegal Characters". Now... (5 Replies)
Discussion started by: mrm5102
5 Replies
6. Shell Programming and Scripting
I have a large file where I want to extract the data by using awk script. I have made a small sample of the input data. I have in the awk script two condition . The first one is to collect the initial time and the second one to collect the end time. I stored the difference between (Time=end-start)... (8 Replies)
Discussion started by: ENG_MOHD
8 Replies
7. Shell Programming and Scripting
array=( 8 5 6 2 3 4 7 1 9 0 )
for i in "${array}"
do
echo $i
done
# i need the output like this by swapping of array values
0
9
1
7
4
3
2
6
5
8 (7 Replies)
Discussion started by: Meeran Rizvi
7 Replies
8. Shell Programming and Scripting
I'm trying to achieve the follwoinig with no luck.
Find the directories that are greater than 50GB in size and pick the owner of the directory as I would like to send an alert notification.
du -sh * | sort -rh
139G Dir_1
84G Dir_2
15G Dir_3
ls -l Dir_1
drwx------ 2... (3 Replies)
Discussion started by: 308002184
3 Replies
9. Shell Programming and Scripting
I have a headerless array of 1000 columns x 100000 rows. The array only contains 4 values; 0/0, 0/1, 1/1, ./.
Here I am showing the 1st 3 rows and columns of the input array
0/0 0/0 1/1
0/1 0/1 0/1
0/0 ./. 0/0
0/0 0/0 0/0
I would like to convert the values in... (9 Replies)
Discussion started by: Geneanalyst
9 Replies
10. Shell Programming and Scripting
Hello!
I'm making an English to Morse Code translator and I was able to mostly get it all working by looking through older posts here; however, I have one small problem.
When I run it it's just printing spaces for where the characters should be. It runs the right amount of times, and if I try... (3 Replies)
Discussion started by: arcoleman10
3 Replies
LEARN ABOUT DEBIAN
netris-sample-robot
netris-sample-robot(6) Netris Sample Robot netris-sample-robot(6)
NAME
netris-sample-robot - sample robot for netris
SYNOPSIS
netris-sample-robot [-l]
DESCRIPTION
The netris-sample-robot is a sample implementation of the robot protocol. It plays quite well but isn't too hard to beat. The robot should
be started from netris with the option -r to connect or wait for another player to join. You can also let two robots play against each
other in that way, if you like.
OPTIONS
-l Writes some log information into the file log in the current working directory. If it can't it bails out.
EXAMPLES
To start the netris-sample-robot waiting for another connection with logfile use the following line:
netris -w -r 'netris-sample-robot -l'
You then just have to start netris somewhere else which connects to that robot.
SEE ALSO
netris(6)
BUGS
One known bug of the netris-sample-robot is that it hangs quite often. This was already filed as a bugreport against the package so please
refrain from doing so again. If you have an idea why this happens or know a solution how to fix it feel free to mail us.
AUTHORS
Netris was written by Mark H. Weaver <mhw@netris.org>.
This manual page was written by Gerfried Fuchs <alfie@debian.org> for the Debian GNU/Linux system (but may be used by others).
0.5 16 Feb 2002 netris-sample-robot(6)