What indication do you have that "something in the syntax is tripping it up"? What are the symptoms that something is going wrong?
Of course, one might guess that part of your problem is with the command inside your for loop:
You define, but do not use, the variable NEWFILE in the command substitution that runs in a subshell environment and disappears before your for loop starts running. So, in that command $NEWFILE will expand to a constant (probably an empty string) value instead of a value based on the name of the file you're processing.
Does the vlc utility really want a sub-option of the form acce~ss=file, or is the tilde (~) in that string a typo?
Instead of throwing away the diagnostic messages produced by the code you're running (2>/dev/null), it might help to actually read those diagnostics and see if they provide any insight into what might be going wrong.
I would also imagine that invoking sed 12 million times makes your script take a long time before it ever gets to the point that it invokes vlc the first time. Why not use a couple of variable expansions inside the loop to avoid invoking sed at all? Note that this operation needs to be in a position where NEWFILE will be paired with the file value it has modified; not in someplace where the vlc command you invoke will be using unpaired $file and $NEWFILE values.
Hi,
please can someone point me in the right direction with a shell scripting problem.
I want to execute a command in a for loop and the command should be started not one-by-one meaning the for loop is waiting for the exit code , it should be started in parallel.
I have a plain text file... (3 Replies)
Hi,
I need to execute parallel with while loop.
Input File(source_file.csv) contains filenames the below
source_file.csv file contains
Customer1.txt
Product1.txt
Sales.txt
Emp.txt
Dept.txt
Based on the number of rows that file I want to run the script ‘n' times.
while... (2 Replies)
OK, I hope you can help me here: I'm trying to crack a hash using John the Ripper. (BindShell.Net: John The Ripper MPI Patch)
I'm runnig it on a cluster system using OpenMPI. But it is not working properly. If i try to run it, i get the following error:
Any idea what can be wrong? Happen on... (3 Replies)
Hi,
I have been thinking of how to script this but i have no clue at all..
Could someone please help me out or give me some idea on this?
I would like to group those lines with the same first variable in each line, joining the 2nd variables with commas.
Let's say i have the following input.
... (8 Replies)
Hi everybody,
my problem is the following:
I'm trying to run an openmpi program on a cluster (atlasz.elte.hu, it's in hungarian, but you can try google translate),
but I always got this error:
Fatal error in MPI_Init: Other MPI error, error stack:
MPIR_Init_thread(394)...........:... (0 Replies)
Hello,
My script shell is:
for i in $(seq $nb_lignes)
do
//command java
done
Please, how can i execute all iteration in parallel ?
Thank you so much. (9 Replies)
Hello All,
I want to test how much parallel ssh connections can be done on a server.
I am thinking of reading username and hostname from a file and then using a loop (may be for) to do ssh on different host.
Could anyone suggest me how can i write the script for the above.
Thank you in... (0 Replies)
I have the below code which runs on multiple databases , but this runs one-after-one. I will need this to run in parallel so that i could save a lot of time. Please help!!! Thanks in advance
for Db in `cat /var/opt/oracle/oratab |egrep -v "ASM" |grep -v \# |cut -d\: -f1`
do
{
export... (5 Replies)
Hi
I am running a loop which actually runs same script for different argument value passed to it.
while read repID
do
echo "Starting for $repID";
date;
perl process_report.pl $repID
done<${FILE_TO_READ}
However this runs in sequence.
I want the loop to not to wait for perl to... (3 Replies)
Hi,
I am using solaris 5.10 environment and need help on doing parallel increment of nested for loop.
Samples
#inside the code the values assigned to a variable by another awk command will be like
a=/xyz/pg/as
/xyz/pg/as2
/xyz/pg/as3
b=/xyz/sd/fd1
/xyz/sd/fd2
/xyz/sd/fd3
for q in... (1 Reply)
Discussion started by: ananan
1 Replies
LEARN ABOUT DEBIAN
ogmsplit
OGMSPLIT(1) User Commands OGMSPLIT(1)NAME
ogmsplit - Split OGG/OGM files into several smaller OGG/OGM files
SYNOPSIS
ogmsplit [options] inname
DESCRIPTION
ogmsplit can be used to easily split an OGM file after a given size. Several OGM files will be created that each start with a keyframe.
inname Use 'inname' as the source.
-o, --output out
Use 'out' as the base name. Ascending part numbers will be appended to it. Default is 'inname'. Examples:
1) If -o output.ogg is given on the command line then ogmsplit will create output-000001.ogg, output-000002.ogg and so on.
2) If no -o option is given and the input's name is movie.ogm then ogmsplit will create movie-000001.ogm and so on.
The operation mode can be set with exactly one of -s, -t, -c or -p. The default mode is to split by size (-s).
-s, --size size
Size in MiB ( = 1024 * 1024 bytes) after which a new file will be opened (approximately). Default is 700MiB. Size can end in 'B' to
indicate 'bytes' instead of 'MiB'.
-t, --time time
Split after the given elapsed time (approximately). 'time' takes the form HH:MM:SS.sss or simply SS(.sss), e.g. 00:05:00.000 or
300.000 or simply 300.
-c, --cuts cuts
Produce output files as specified by cuts, a list of slices of the form "start-end" or "start+length", separated by commas. If start
is omitted, it defaults to the end of the previous cut. start and end take the same format as the arguments to -t.
-n, --num num
Don't create more than num separate files. The last one may be bigger than the desired size. Default is an unlimited number of
files. Can only be used with -s or -t.
--frontend
Frontend mode. Progress output will be terminated by
instead of
.
-p, --print-splitpoints
Only print the key frames and the number of bytes encountered before each. Useful to find the exact splitting point.
-v, --verbose
Be verbose and show each OGG packet. Can be used twice to increase verbosity.
-h, --help
Show this help.
-V, --version
Show version information.
CHAPTER INFORMATION
ogmsplit correctly handles chapter information. During the first pass the chapter information, if any is present, will be adjusted to match
the output files generated. Chapters that are not contained in the current output file are removed entirely. The other chapters are renum-
bered to start at 1, and their timestamps will be recalculated.
Example: If your source file contains these four chapters:
CHAPTER01=00:00:00.000
CHAPTER01NAME=Chapter 01
CHAPTER02=00:10:00.000
CHAPTER02NAME=Chapter 02
CHAPTER03=00:20:00.000
CHAPTER03NAME=Chapter 03
CHAPTER04=00:25:00.000
CHAPTER04NAME=Chapter 04
and you split after 15 minutes, then the first output file will only contain the first two chapters as shown above, and the second output
file will contain the following two chapters and the remaining part of the first:
CHAPTER01=00:00:00.000
CHAPTER01NAME=Chapter 02 (continued)
CHAPTER02=00:05:00.000
CHAPTER02NAME=Chapter 03
CHAPTER03=00:10:00.000
CHAPTER03NAME=Chapter 04
Note that only variable names are changed, not the chapter names themselves. The exception is the first chapter of the second and follow-
ing files where "(continued)" is appended in order to indicate that this is not the start of this chapter. If you want to change them as
well you'll have to remerge the resulting file with a new chapter file.
AUTHOR
ogmsplit was written by Moritz Bunkus <moritz@bunkus.org>.
SEE ALSO ogmmerge(1), ogminfo(1), ogmdemux(1), ogmcat(1), dvdxchap(1)WWW
The newest version can always be found at <http://www.bunkus.org/videotools/ogmtools/> <http://www.bunkus.org/videotools/ogmtools/>
ogmsplit v1.5 November 2004 OGMSPLIT(1)