04-26-2009
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have 'translated' selection sort from java to KSH, here is my code
#1. get the inputs and put into arr
print "Enter the integers (separated by a space):"
read integers
set -A arr $integers
#2. start sorting process, using selection sort
min=0
tmp=0
i=0
while test $i -lt... (2 Replies)
Discussion started by: laduch
2 Replies
2. Shell Programming and Scripting
Hi
I'm fairly new to unix and scripting (in BASH) and am here to post my first question.
What I'm trying to do is pipe a sorted listing (ls) to zenity and when the list appears to the user, the choice they choose is returned to a variable so it can be used in conditional statements.
I can... (2 Replies)
Discussion started by: Vayshan
2 Replies
3. UNIX for Dummies Questions & Answers
hey all, me again....having a problem with my code, where I essentially am trying to show a menu, have the user select an option (from 1 to 5), then display which selection they picked...
#!/bin/bash
# A LIST OF THE ERROR MESSAGES AND THE PROPER SYNTAX:
error_0="Correct amount of... (1 Reply)
Discussion started by: SoVi3t
1 Replies
4. Shell Programming and Scripting
I have a txt file with several columns and i want to peform an operation on two columns and output it to a new txt file .
file.txt
900.00000 1 1 1
500.00000
500.00000
100000.000
4
4
1.45257346E-07 899.10834 ... (4 Replies)
Discussion started by: shashi792
4 Replies
5. Shell Programming and Scripting
Hi
I have a file with 3 columns. say,
infile:
1 50 68
34 3 23
23 4 56
-------
-------
I want to generate n files from this file using a loop so that 1st column in output file is (column1 of infile/(2*n+2.561))
I am doing like this:
for ((i=1; i<=3; i++))
do
a=`echo... (3 Replies)
Discussion started by: Surabhi_so_mh
3 Replies
6. Shell Programming and Scripting
Hi,
I'm trying to populate bash script variable, data_size with the
size of the largest file in my current directory
data_size=$(ls -lS | grep -v "total" | head -1) | awk '{ print $5 }'
I've tried adding an echo before the call to awk
data_size=$(ls -l | grep -v "total" | head -1) |... (2 Replies)
Discussion started by: mark_s_g
2 Replies
7. Shell Programming and Scripting
what I'm trying to do is ... need to drop tables w/ names like
ABC_NY_2001
ABC_ORD_2001
ABC_TX_2001
ABC_CL_2001
For this, I want to write a query "DROP TABLE ABC_var_2001".
now "var" should be either NY, ORD, TX or CL.
I'm new to programming so don't know how to create a variable w/ OR... (3 Replies)
Discussion started by: ramsowji
3 Replies
8. Shell Programming and Scripting
Hello;
I have:
ll | grep -v ^d | awk '{print $9}'
rcx_access_report_fid.txt
rcx_access_report_hsi.txt
rcx_access_report_mmm.txt
rcx_access_report_qsc.txt
I want to get:
rcx_access_report_fid.txt
rcx_access_report_hsi
rcx_access_report_mmm
rcx_access_report_qsc
But when I try: (9 Replies)
Discussion started by: delphys
9 Replies
9. Shell Programming and Scripting
can someone help me assign the selection of a drop down menu to a variable? the variable i need to store the selection in is inputA.
<form name="inputA">
<p align="center">
<p align="center">Name: <input name="inputA" type="text" size="45">
<select>
<?php
if ($handle =... (1 Reply)
Discussion started by: SkySmart
1 Replies
10. Shell Programming and Scripting
Hi,
Here is the script i try to perform arithmetic operation in two variables .
git branch -r | while read brname ; do
REV_COMMITS=`git rev-list --count $brname`
echo "$brname has $REV_COMMITS"
(( TOTAL = TOTAL + REV_COMMITS ))
echo "in loop" $TOTAL
done
echo "total is " $TOTAL
... (3 Replies)
Discussion started by: greet_sed
3 Replies
LEARN ABOUT DEBIAN
vbrfix
VBRFIX(1) User Commands VBRFIX(1)
NAME
vbrfix - fix erroneous VBR MP3 files
SYNOPSIS
vbrfix -flag1 -flag2 -flagn in.mp3 out.mp3
DESCRIPTION
In an average song there are points that require high quality and points that require low quality (i.e., silence). Instead of having the
whole file at 160kbps (CBR - Constant Bit Rate), we can use VBR - Variable Bit rate. This allows us to have say 96Kbps at points not
requiring high quality and 192kbps when we need it: resulting in an overall smaller but higher quality MP3.
However, the problem is that many MP3 programs estimate the time of a MP3 based on the first bitrate they find and the filesize. With VBR
you can get fairly random times; as most songs start with silence you usually get the song length being shown as much longer than it should
be. Also when you jump through the file in VBR: 50% through the file is not 50% through the song.
A VBR null frame is placed at the beginning of the file to tell the MP3 player information about the song length and indexing through the
song. Some poor encoders don't produce this null frame or do so incorrectly - this is what vbrfix attempts to fix. Vbrfix can also fix
other problems with MP3s as it deletes all non-MP3 content (other than tags you state you want to keep).
It can also help when merging two VBR MP3s together with a merging tool and then needing a newly calculated VBR null frame.
-ri1 removeId3v1 Tag
-ri2 removeId3v2 Tag
-skiplame if a tag was made by LAME don't fix it
-always always write a new file even if not VBR
-makevbr make it VBR (you need -always also)
-log write a log file
-lameinfo keep the lame info
SEE ALSO
lame (1)
VBRFIX Command Line Version May 2010 VBRFIX(1)