awk 'BEGIN{split("DD AA BB CC",P)}
{print P[NR%4+1],$0}' file
Not quite. In awk, + has higher precedence than % (so you're doing mod 5 rather than (mod 4) + 1). If you change the subscript in the 2nd line to (NR%4)+1, you'd get what you wanted.
-------------------------------------
Ouch... I apologize. I was looking at unary + not binary +. Pamu's code is correct as written.
Hi Folks,
I have a file with all fields defined by byte position, but any field can be empty so I cannot print lines based on a search of specific columns. I need to print all lines of this file where the string of two characters at byte position 100-101 contains the number 27. Any ideas?
... (4 Replies)
using sed to replace a specific string on a specific line number using variables
this is where i am at
grep -v WARNING output | grep -v spawn | grep -v Passphrase | grep -v Authentication | grep -v '/sbin/tfadmin netguard -C'| grep -v 'NETWORK>' >> output.clean
grep -n Destination... (2 Replies)
Hi,
I have list of directory paths in a variable and i want to delete those dirs and if dir does not exist then search that string and get the correct path from xml file after that delete the correct directory. i tried to use grep and it prints the entire line from the search.once i get the entire... (7 Replies)
Hi all,
I have a string that looks like:
#!/bin/sh
options="arguments: --user=alpha --group=beta --prefix=/usr/share --proxy-path=/proxy --proxy-tmp=/tmp --conf-path=/etc"
My goal is to transform the string into an array, then for each key, if it starts with "--proxy" to print the string... (2 Replies)
awk experts,
I have a big file of 4000 columns with header. Would like to print the columns with string value of "Commands" in header. File has "," separator. This file is on ESX host with Bash.
Thanks,
Arv (21 Replies)
Hi Gurus
I am new to this forum.. I am using HP Unix OS.
I have one single string in input file as shown below
Abc123 | cde | fgh | ghik| lmno | Abc456 |one |two |three | four | Abc789 | five | Six | seven | eight | Abc098 | ........
I want to achive the result in a output file as shown... (3 Replies)
I'm still beginner and maybe someone can help me.
I have this input:
the great warrior a, b, c
and what i want to know is, with awk, how can i detect the string with 'warrior' string on it and print the a, b, and c seperately, become like this :
Warrior Type
a
b
c
Im still very... (3 Replies)
hi gurus,
I would like to be able to use awk to process 1 file as such:
abc 1 2 3 4 5 6 7 8 9 10
flags 1 2 4
flags 1 2 5
abc 2 3 4 5 6 7 8 9 10 11
flags 1 2 3
abc 4 5 6 7 8 9 6 7 78 89
flags 1 2 3
flags 1 2 4
flags 1 2 3 4
I would like to be able to print field 1 and 5 when the... (4 Replies)
In the below awk I am trying to print expName only if another tag planExecuted is true. In addition to the expName I am also printing planShortID. For some reason the word experiment gets printed so I remove it with sed. I have attached the complete index.html as well as included a sample of it... (1 Reply)
Discussion started by: cmccabe
1 Replies
LEARN ABOUT DEBIAN
zoomer
ZOOMER(1) General Commands Manual ZOOMER(1)NAME
zoomer -- generate a video from a picture by zooming from one point to another
SYNOPSIS
zoomer options...
DESCRIPTION
zoomer automatically generates a video from a picture. It starts at the full picture and then zooms into the first point. Then zooms out
and into the next point, etc. At the moment of reaching a point, zoomer will write a text (e.g. a name).
zoomer needs a picture (bigger is better) and a data file to define the points to be zoomed into.
OPTIONS --data
the data file setting the details to be zoomed.
--debug
show a verbose output
--frames-moveing
how many frames between details
--frames-stoped
how many frames focused on the detail
--font-size
the size of the text
--output
the name of the output video
--pic
the name of the input picture (bigger is better)
--replace-output
will automaticaly delete a file with the same output name
--use-zenity
will show a nice graphical progress bar
--video-size
the video resolution in the WxH notation like 480x360
THE DATA FILE
The data file is a simple text file to provide informaton about where zoomer must zoom. There must be one line by detail and no other
information. The zoomer don't supports empty lines or commentaries.
The detail line has the pattern: X,Y Width Text
See a data example:
364,178 57 Bart
233,246 62 Lisa
396,274 52 Maggie
302,059 61 Marge
228,130 66 Homer
The Width is the with of the soom square. The Height will be ever proporcional to the output setted height.
AUTHOR
This manual page was written by Aurelio A. Heckert aurium@gmail.com for the Debian system (but may be used by others). Permission is
granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 any later version pub-
lished by the Free Software Foundation.
On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/.
ZOOMER(1)