Sponsored Content
Full Discussion: Ssh newbie
Top Forums UNIX for Beginners Questions & Answers Ssh newbie Post 303046273 by TapasTom on Wednesday 29th of April 2020 08:17:41 AM
Old 04-29-2020
Ssh newbie

What I am trying todo is: I want to create a script on mac that monitors a folder and merge the videa and the audio. But if file01 exists (previous merge file) I want it to create file02 and if this one exists I want it to create file03,... I would be very happy if the older files could be deleted because of disk space. But this one is tricky because I monitor the folder through folder action setup on mac. This is what I get so far:
Code:
!/bin/bash
now=$(date +"%d_%m_%Y_%Hu%M") 

cd "/Users/tomvanwinkel/Documents/Convert/Merge"
for filename in .mp4; 
do     
    stub="${filename%.}" 
    /usr/local/bin/ffmpeg -i "${stub}.mp4" -i "${stub}.wav" -c:v copy -c:a aac -map 0:v:0 -map 1:a:0 "${stub}_ok".mp4
   FILE="${stub}_ok".mp4 
   if [ -f "$FILE" ]; 
   then     
      cp "${stub}_ok".mp4 "${stub}_ok01".mp4 
   fi
done


Last edited by vbe; 04-29-2020 at 09:29 AM.. Reason: code tags
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

UNIX newbie NEWBIE question!

Hello everyone, Just started UNIX today! In our school we use solaris. I just want to know how do I setup Solaris 10 not the GUI one, the one where you have to type the commands like ECHO, ls, pwd, etc... I have windows xp and I also have vmware. I hope I am not missing anything! :p (4 Replies)
Discussion started by: Hanamachi
4 Replies

2. Shell Programming and Scripting

perl newbie . &&..programming newbie (question 2)

Hello everyone, I am having to do a lot of perl scripting these days and I am learning a lot. I have this problem I want to move files from a folder and all its sub folders to one parent folder, they are all .gz files.. there is folder1\folder2\*.gz and there are about 50 folders... (1 Reply)
Discussion started by: xytiz
1 Replies

3. Shell Programming and Scripting

perl newbie . &&..programming newbie

Hi, I am new to programming and also to perl..But i know 'perl' can come to my rescue, But I am stuck at many places and need help..any small help is much appreciated... below is the description of what i intend to acheive with my script. I have a files named in this format... (13 Replies)
Discussion started by: xytiz
13 Replies

4. Shell Programming and Scripting

could not send commands SSH session with Net::SSH::Expect

I am using Net::SSH::Expect to connect to the device(iLO) with SSH. After the $ssh->login() I'm able to view the prompt, but not able to send any coommands. With the putty I can connect to the device and execute the commands without any issues. Here is the sample script my $ssh =... (0 Replies)
Discussion started by: hansini
0 Replies

5. Shell Programming and Scripting

Using ssh to add register key on ssh server

Hi, I want to use ssh to add a register key on remote ssh server. Since there are space characters in my register key string, it always failed. If there is no space characters in the string, it worked fine. The following is what I have tried. It seems that "ssh" command doesn't care about double... (9 Replies)
Discussion started by: leaftree
9 Replies

6. Shell Programming and Scripting

Ssh = ssh expect and keep everything not change include parameter postion

I have write a script which contains ssh -p 12345 dcplatform@10.125.42.50 ssh 127.0.0.1 -p 5555 "$CMD" ssh root@$GUEST_IP "$CMD" before I use public key, it works well, now I want to change to "expect", BUT I don't want to change above code and "parameter position" I can post a... (1 Reply)
Discussion started by: yanglei_fage
1 Replies

7. Shell Programming and Scripting

Check if file exists via ssh in ssh (nested)

I'm using redhat and have an odd issue with a nested ssh call. ssh -i ~/.ssh/transfer-key -q transfer@fserver1 ] && ssh -i ~/.ssh/transfer-key transfer@fserver1 "ssh -i ~/.ssh/sftp-key sftpin@10.0.0.1 ]" && ssh -i ~/.ssh/transfer-key transfer@fserver1 "scp -i ~/.ssh/sftp-key /home/S/outbox/*... (2 Replies)
Discussion started by: say170
2 Replies

8. UNIX for Beginners Questions & Answers

Ssh script to validate ssh connection to multiple serves with status

Hi, I want to validate ssh connection one after one for multiple servers..... password less keys already setup but now i want to validate if ssh is working fine or not... I have .sh script like below and i have servers.txt contains all the list of servers #/bin/bash for host in $(cat... (3 Replies)
Discussion started by: sreeram4
3 Replies

9. Shell Programming and Scripting

Find active SSH servers w/ ssh keys on LAN

Hi, I am trying to complete my bash script in order to find which SSH servers on LAN are still active with the ssh keys, but i am frozen at this step: #!/bin/bash # LAN SSH KEYS DISCOVERY SCRIPT </etc/passwd \ grep /bin/bash | cut -d: -f6 | sudo xargs -i -- sh -c ' && cat... (11 Replies)
Discussion started by: syrius
11 Replies
MP4TRACK(1)							  MP4v2 Utilities						       MP4TRACK(1)

NAME
mp4track - manual page for mp4track - MP4v2 2.0.0 SYNOPSIS
mp4track [OPTION]... [PARAMETERS]... ACTION file... DESCRIPTION
For each mp4 file specified, perform the specified ACTION. An action must be specified. Some options are not applicable to some actions. ACTIONS --list list all tracks in mp4 --enabled BOOL set trak.tkhd.flags (enabled bit) --inmovie BOOL set trak.tkhd.flags (inMovie bit) --inpreview BOOL set trak.tkhd.flags (inPreview bit) --layer NUM set trak.tkhd.layer --altgroup NUM set trak.tkhd.alternate_group --volume FLOAT set trak.tkhd.volume --width FLOAT set trak.tkhd.width --height FLOAT set trak.tkhd.height --language CODE set trak.mdia.mdhd.language --hdlrname STR set trak.mdia.hdlr.name --udtaname STR set trak.udta.name.value --udtaname-remove remove trak.udta.name atom --colr-list list all colr-boxes in mp4 --colr-add add colr-box to a video track --colr-set set colr-box parms --colr-remove remove colr-box from track --pasp-list list all pasp-boxes in mp4 --pasp-add add pasp-box to a video track --pasp-set set pasp-box parms --pasp-remove remove pasp-box from track PARAMETERS --track-any act on any/all tracks --track-index IDX act on track index IDX --track-id ID act on track id ID --colr-parms CSV where CSV is IDX1,IDX2,IDX3 --colr-parm-hd equivalent to --colr-parms=1,1,1 --colr-parm-sd equivalent to --colr-parms=6,1,6 --pasp-parms CSV where CSV is hSPACING,vSPACING OPTIONS -z, --optimize optimize mp4 file after modification -y, --dryrun do not actually create or modify any files -k, --keepgoing continue batch processing even after errors -o, --overwrite overwrite existing files when creating -f, --force force overwrite even if file is read-only -q, --quiet equivalent to --verbose 0 -d, --debug NUM increase debug or long-option to set NUM -v, --verbose NUM increase verbosity or long-option to set NUM -h, --help print brief help or long-option for extended help --version print version information and exit DEBUG LEVELS (for raw mp4 file I/O) 0 supressed 1 add warnings and errors (default) 2 add table details 3 add implicits 4 everything VERBOSE LEVELS 0 warnings and errors 1 normal informative messages (default) 2 more informative messages 3 everything mp4track - MP4v2 2.0.0 June 2012 MP4TRACK(1)
All times are GMT -4. The time now is 11:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy