03-02-2009
Thanks again Franklin52
now things getting into my mind.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
When i run the below command i am able to get the output.
awk '/BEGIN DSSUBRECORD/{c=3;next}c-->0' abc.txt |
awk '/END DSSUBRECORD/{exit}{print}' |
awk '/Owner/{exit}{print}' |
awk '{n2=n1;n1=n;n=$0;if(NR%3==0){printf"%s,%s,%s\n",n2,n1,n}}'
Output:
Name "file_name", ... (5 Replies)
Discussion started by: onesuri
5 Replies
2. Shell Programming and Scripting
Hi experts,
Sorry if it sounds basic question. I am trying to delete all folders except a particular and I have written the following. But its not deleting the folder.
Could you tell me whats wrong?
folders are:
1 2 3 4 5 6
ls -l | awk '{ if ($9 != 4) {system(/bin/rmdir $9);print... (5 Replies)
Discussion started by: amitrajvarma
5 Replies
3. Shell Programming and Scripting
Hello all,
Here is what my bash script does: sums number columns, saves the tot in new column, outputs if tot >= threshold val:
> cat getnon0file.sh
#!/bin/bash
this="getnon0file.sh"
USAGE=$this"
InFile="xyz.38"
Min="0.05"
#
awk '{sum=0; for(n=2; n<=NF; n++){sum+=$n};... (4 Replies)
Discussion started by: catalys
4 Replies
4. UNIX for Dummies Questions & Answers
Hello,
I have two files File1 & File2.
File1
76 135
136 200
250 345
....
File2
1 24
1 35
1 36
1 72
....
I want to get all the values form File2 corresponding to the range in File 1 and feed it to a program. Is the code below right? Can I pass shell variables to awk in this... (2 Replies)
Discussion started by: Gussifinknottle
2 Replies
5. Shell Programming and Scripting
Trying to do something like this
ls -lrt | awk '$9=="test5"'
-rw-r--r-- 1 lrmq db2iadm1 381 Sep 20 21:56 test5
But now, I need to give a variable in place of test5. For example let's define x as test5
x=test5
ls -lrt | awk '$9=="$x"'
This doesn't seem to be working. It doesn't take the... (4 Replies)
Discussion started by: blazer789
4 Replies
6. Shell Programming and Scripting
Hi,
I hope you can help me with the awk command in shell scripting.
I want to do the following, but it doesn't work.
for i in $REF1 $REF2 $REF3; do
awk '{if($n>=0 && $n<=50000){count+=1}} END{print count}' ${DIR}${i} >${DIR}${i}_count.txt
done
REF1 to REF3 are only variables for .txt... (1 Reply)
Discussion started by: y.g.
1 Replies
7. Shell Programming and Scripting
Hi ,
Please excuse me for opening a new thread i am unable to find out the syntax error
in my if else condition inside for loop in awk command ,
my actual aim is to print formatted html td tag when if condition (True) having string as "failed",
could anyone please advise what is the right... (2 Replies)
Discussion started by: karthikram
2 Replies
8. Shell Programming and Scripting
I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist.
diff=$1$2.diff
id=$2 new=new_$diff
echo "My id is $1"
echo "I want to sync for user account $id"
##awk command I am using is as below
cat $diff | awk... (2 Replies)
Discussion started by: Ashunayak
2 Replies
9. Shell Programming and Scripting
I am able to execute awk command from shell prompt. but the same command is not getting executed when written and run in a bash script
the command from bash cmd prompt.
awk '/world/{for (i=2; i<NF; i++) printf $i " "; print $NF}1' myfile >tmp$$ ; mv tmp$$ myfile
file:
# hello world my... (4 Replies)
Discussion started by: ashima jain
4 Replies
10. Shell Programming and Scripting
Hi
I want to create a shell script with the following awk command & also get the filenames in output.
awk '/<catetcsecuretty0>/ {p=1} /<catvarlogmessages0>/ {p=0} p' *.xml
As there will be multiple outputs related to many xml files I cannot identify which output belongs to which file
... (5 Replies)
Discussion started by: sharp488
5 Replies
LEARN ABOUT DEBIAN
encodedv
ENCODE(1) General Commands Manual ENCODE(1)
NAME
encodedv - encode a series of images to a digital video stream
SYNOPSIS
encodedv [ options ] video_pattern [ audio_input ]
DESCRIPTION
encodedv takes a series of images in PPM/PGM/video format and optionally an audio stream and compiles them into a DV-encoded video stream.
pattern specifies where the input data is located and may be either - for stdin, or a printf-style pattern taking one numeric argument that
gets replaced by the current frame number. Like image%03d.ppm, which gets expanded to image000.ppm, image001.ppm, etc.
--version
show encodedv version number.
-s, --start-frame=count
start encoding at frame number count (defaults to 0).
-e, --end-frame=count
end encoding at frame number count (defaults to unlimited).
-l, --wrong-interlace
flip lines to compensate for wrong interlacing in the input data. Happened with mpeg2dec generated data.
-p, --vlc-passes
vlc code distribution passes (1-3) greater values = better quality but not necessarily slower encoding! This defaults for best qual-
ity = 3.
-v, --verbose
show encoder statistics / status information
-i, --input=filter-name
Choose input-filter: [>ppm<, pgm, video] The ppm-filter only supports raw rgb ppm files. The pgm file format is the one generated
by mpeg2dec of the livid project. ( http://linuxvideo.org ) This means: Y-data appended by U and V data which are scaled down by 2
and placed side by side. This option defaults to PPM. Some things you want to keep in mind:
1) If you want to stream video frames (using video_pattern = "-") you have to make sure that there is no trailing garbage at the end
of the pictures. This is ignored by most image manipulation programs!
2) If you are one of the poor persons with a buggy PCI bus-mastering board be sure to have a backup handy if you want to use video
support. Some versions of the VIA board chipsets crash your machine and even your harddisk. Since encodedv uses full resolution cap-
turing it is more likely to trigger these bugs than other programs. If you have a VIA board you definitely want to upgrade to Linux
2.4.3 or higher.
3) The encoded pictures must have the correct resolution. If they don't, you may want to try ppmqscale. The used video format is
chosen by picture resolution. Use 720x576 for PAL and 720x480 for NTSC.
4) If you want to speed up things a little bit and you are generating the input pictures automatically you may want to try pgm's
instead of ppm's since they are encoded somewhat faster. But keep in mind, that this pgm format is only optimal for PAL since NTSC
averages the U and V values somewhat differently.
-a, --audio-input=filter-name
Choose audio-input-filter: [>none<, wav, dsp]
-o, --output=filter-name
Choose output-filter: [>raw<]
-q, --static-qno=table-no
Static qno tables for quantisation on 2 VLC passes. For turbo (but somewhat lossy encoding) try -q [1,2] -p [2,3]. There are only
two static qno tables registered right now:
1 : for sharp DV pictures
2 : for somewhat noisy satelite television signal
If you want to add some more, go ahead ;-)
-f, --fps=fps-number
Set frames per second (default: use all frames)
-d, --force-dct=dct-mode
Force dct mode (88 or 248) for whole picture
Help Options
-?, --help
Show help message.
--usage
Display brief usage message.
SEE ALSO
playdv(1),dvconnect(1),dubdv(1),encodedv(1).
AVAILABILITY
See http://libdv.sourceforge.net/ for the latest version.
AUTHORS
encodedv was written by James Bowman <jamesb@excamera.com> and Peter Schlaile <udbz@rz.uni-karlsruhe.de>.
This manual page is based on encodedv's help message and was written by Daniel Kobras <kobras@debian.org> for the Debian GNU/Linux system
(but may be used by others). It was updated by Peter Schlaile <udbz@rz.uni-karlsruhe.de>.
April 2001 ENCODE(1)