I'm trying to branch out and learn Linux, but my comfort zone is PowerShell. I figure the best way to learn it is to do it so I moved my Plex Media Server to Ubuntu Server.
What I'm trying to do is build a script that searches a directory and all subdirectories for files with the .ts extension, then sends them to handbrakecli to get converted, then deletes the .ts file because its huge. Here's what I've got so far. It's a mix of PowerShell and what I've gleened/stolen from around the internet. I've commented the end of each line that isn't bash, but I'm sure you guys will be able to tell.
Any help or pointers in the right direction would be awesome!
Last edited by Scrutinizer; 05-27-2018 at 01:04 AM..
Reason: quote tags -> code tags
I'm new to Unix. I'm just looking for really good unix documents through Internet as pdf format on programming in all shells, and system adminstrator documents, and well as just all around really good documents on unix.
Thank you (5 Replies)
hello everyone, i am still trying to get this script to work, but with no luck. It is a little beyond my knowledge of scripting at the moment. The beginner book i have has an exercise listed that asks me to write a script tha allows for user input.
For example " what is your name: " and then you... (3 Replies)
I was wondering if someone could tell me where I could learn everything about Unix/Linux
and I was also wondering what the differance between Unix and Linux was :confused:
Ive never used it, never seen it.. But Im interested in learning :D (3 Replies)
I have this command line entry that I would like to turn into a script. I want to be able to just run the script with options for the report name and switch. Can anyone help me get started? I am hoping that by creating this script it will help me be able to create more.
I have never written one. I... (11 Replies)
I have just installed Ubuntu because I need a linux system asap and Ubuntu seems to be easiest for that. But I plan on installing some other Linux distro's for a while (maybe on virtualBox too) so i can understand the inner workings of linux and especially more about unix. I know that alot of the... (11 Replies)
Hi friends,
I hope everybody is fine. I have been studing operating system concepts at college, and I find this subject very interesting. I've decided that I must go into this field no matter what, hopefully someday I would design my own operating system. I have two choices infront of me, studying... (9 Replies)
hi guys,
i got job recently in a company which provide a product for data backup and data recovery... as dis product is wrriten in c++ am workin in c++.. now am under training and i want to learn abt Operating System concepts and OS programming using c and c++. i know basic c and c++ programming... (0 Replies)
I am working on learning Linux, and somebody suggested setting up Linux on a separate computer, and searching for answers to whatever may be needed, on a different computer plugged in to the Internet.
I have a Windows 7 PC, plugged in to a cable modem, and an old notebook, Compaq Presario R3000... (5 Replies)
Hi there,
im just having a hard time understanding why this code does not print anything that is suppose to print:
score = raw_input ('what is your score? \n')
try:
if 1.0 == float(score) >= 0.9:
print "A"
elif 0.9 > float(score) >= 0.8:
... (1 Reply)
Discussion started by: la2015
1 Replies
LEARN ABOUT DEBIAN
mojo::server::psgi
Mojo::Server::PSGI(3pm) User Contributed Perl Documentation Mojo::Server::PSGI(3pm)NAME
Mojo::Server::PSGI - PSGI server
SYNOPSIS
use Mojo::Server::PSGI;
my $psgi = Mojo::Server::PSGI->new;
$psgi->unsubscribe('request');
$psgi->on(request => sub {
my ($psgi, $tx) = @_;
# Request
my $method = $tx->req->method;
my $path = $tx->req->url->path;
# Response
$tx->res->code(200);
$tx->res->headers->content_type('text/plain');
$tx->res->body("$method request for $path!");
# Resume transaction
$tx->resume;
});
my $app = $psgi->to_psgi_app;
DESCRIPTION
Mojo::Server::PSGI allows Mojo applications to run on all PSGI compatible servers.
See Mojolicious::Guides::Cookbook for more.
EVENTS
Mojo::Server::PSGI inherits all events from Mojo::Server.
METHODS
Mojo::Server::PSGI inherits all methods from Mojo::Server and implements the following new ones.
"run"
my $res = $psgi->run($env);
Run PSGI.
"to_psgi_app"
my $app = $psgi->to_psgi_app;
Turn Mojo application into PSGI application.
SEE ALSO
Mojolicious, Mojolicious::Guides, <http://mojolicio.us>.
perl v5.14.2 2012-09-05 Mojo::Server::PSGI(3pm)