Ubuntu :: Point To A Two-digit Interval With Regular Expressions?

Sep 9, 2010

Is it possible to point to a two-digit interval with regular expressions?

Background:
I'm using mplayer to watch tv shows, that often have episode numbers in their names. I know how to easily add several files to the playlist by using brackets, by typing something like
$ mplayer tv/South.Park.S1.E0[1-5]*avi

Is there a way to point to files 06-13 in a single expression?

View 2 Replies


ADVERTISEMENT

Ubuntu :: How Do I Use Regular Expressions

Aug 15, 2010

I want to use regular expressions and sed to remove html tags from a text file.

View 2 Replies View Related

Debian :: Apt-mirror Not Running At Regular Interval

Mar 27, 2016

I use apt-mirror to sync a local copy of Debian repo on my HDD. I recently reinstalled my Debian setup, and now I can't seem to make apt-mirror run at regular intervals!? As far as I can recall (and as mentioned on different sites) all I have to do is edit /etc/cron.d/apt-mirror

I tried adding the following lines, but nothing works

Code: Select all0 0,6,12,18 * * * apt-mirror    /usr/bin/apt-mirror > /var/spool/apt-mirror/var/cron.log
Code: Select all0 0-23/6 * * * apt-mirror    /usr/bin/apt-mirror > /var/spool/apt-mirror/var/cron.log

Also, the log file is empty!!

View 2 Replies View Related

General :: Regular Expression To Grep For A N Digit Number?

Nov 23, 2010

I just want to grep for a n digit number followed by M alphabet. Generally for a three digit number i can give grep [0-9][0-9][0-9]M , but if the digits are increasing it is tough to represent them.

View 7 Replies View Related

Ubuntu :: MP3 Metadata With Regular Expressions?

Mar 29, 2010

how a way that I can edit the metadata tags on some MP3s using regex?

I've got almost 100 MP3, all named "01 - <song title>," "02 - <song title>," etc., and I, understandably, don't want to edit them all by hand.

Running "s/d{2} - //g" would be so much easier.

View 4 Replies View Related

General :: Using Wc And Grep With Regular Expressions?

Apr 16, 2010

I'm writing a program that works with text files, and I'm trying to create some filters with grep. I have various questions here, so I'll number them for clarity.

1) First of all, I'd like to know what wc -w is actually returning. The word count is less than what gedit is counting in Document Statistics, so obviously gedit is counting something (like newlines) that wc -w is not

2) Secondly, I was wondering if there was a way to grep x number of words. I'm looking for something like the -m option, but returning a certain number of words instead of lines. For example, to find the first 2000 words, do something like grep -someoption 2000 ".*" or using {1,2000}.

3) Finally, I'm trying to filter out headers and footers of a text file but having no luck. The text files are Project Gutenberg files, so they have standardized headers and footers. Here's an example: [URL]...

The header starts with "The Project Gutenberg EBook of" and ends with the line containing "START OF THIS PROJECT GUTENBERG EBOOK" The footers begin with: "End of the Project Gutenberg EBook of" My problem is, grep can find:

[Code]...

View 15 Replies View Related

Software :: Library For Regular Expressions In C++?

Mar 26, 2011

I've began to develop with C++ (Eclipse+Qt) and the first problem I see is that there is not good functions for manipulating strings. if there is a library for manipulating strings with regular expressions?

View 1 Replies View Related

Programming :: Ant Build.xml And Regular Expressions?

May 31, 2011

i am trying to create an exclude regular expression for my build.xml. The problem is, that i am trying to find some info on which REs are acceptable/valid for ant... Is ant using standard regular expressions? POSIX ones? Since it is a java-based tool, the "Java REs" are probably valid. I am a little bit confused. If somebody can help me out with the different RE standards, i would be most obliged.

View 1 Replies View Related

Programming :: Using Regular Expressions With Find?

Mar 17, 2010

Gidday, I'm puzzled as to why this works:

Code:
find /Data/ -type f -iname "*7pm*"
But this doesn't:
Code:
find /Data/ -type f -regex *7[Pp][Mm]*

I've tried MANY variations, but I'm getting no error messages, just no returns, and yet the first find, will find the sorts of files I'm looking for. I realise a win is a win, but I'm of the understanding that the -regex switch allows for some really complex use of regular expressions - but I can't even get a very simple one to work,

View 4 Replies View Related

Fedora :: Regular Expressions And E-mail Validation?

Jan 12, 2010

The * would not have to be because it means everything [az] [0-9 ][$%&!"/()=?'=) but not how to solve[URL]..

ls [0-9a-zA-Z]*[@]*[gmail | yahoo | hotmail]*[.]*[com]
ls [0-9a-zA-Z][.-_][0-9a-zA-Z]*[@]*[gmail | yahoo | hotmail]*[.]*[com]

View 2 Replies View Related

General :: Terminal - Using Regular Expressions With Grep

Aug 3, 2011

I can't get this simple regular expression to work for matching emails: 'w*(?:.w*)*@w*(?:.w*)*w{2,5}'

It should be working as I have tested it with regex pal and it works just fine. I think there's a problem with optional character class but I'm not sure.

View 1 Replies View Related

General :: Regular Expressions In Batch Script?

May 5, 2010

I am pretty new at this topic but I would like to learn it from example. The first thing I am working on is to modify the command date to be shown as DD/MM/YY only using regular expression but I dont know how to combine what there is in the regexp tutorials online and the syntax for batch scripting. Any help?

Here is what I what.
run a file test: ~# ./test
Where file test is:
#!/bin/bash
#
DATE=$( date )

[Code]..

Also if you can point me to good regexp tutorials (directed towards batch scripting), that will be great.

View 8 Replies View Related

General :: Difference Between Regular Expressions And Globbing?

Aug 26, 2010

As the subject says, can anyone explain to me what is the difference between Regular Expressions and Globbing?

View 9 Replies View Related

Software :: Make Vim Use Extended Regular Expressions?

Jun 8, 2010

How do I make Vim use extended regular expressions?

I really wish I wouldn't have to use all these ugly backslashes to do backreferences.

View 3 Replies View Related

General :: Process Multi-line Regular Expressions?

Feb 23, 2010

How to make tools like sed operate on the whole file, instead of line-by-line?

View 14 Replies View Related

General :: Regular Expressions Match 2 File Names?

Nov 20, 2010

How can we do a simple match by regular expressions on two filenames. I plan to use it in the command 'find -regex'

Code:
hosts.txt
ipaddress.txt

View 4 Replies View Related

General :: Delete Files On The Command Line With Regular Expressions?

May 6, 2010

Lets say I have 20 files named FOOXX, where XX is the number of the file, eg 01, 02 etc. At the moment, if I want to delete all files lower than the number 10, this is easy and I just use a wildcard, eg rm FOO0* However, if I want to delete specific files ina range, eg 13-15, this becomes more difficult. rm FPP[13-15] does not work, and asks me if I wish to delete all files. Likewse rm FOO1[3-5] wishes to delete all files that begin with FOO1 So, what is the best way to delete ranges of files like this? I have tried with both bash and zsh, and I don't think they differ so much for such a basic task?

View 2 Replies View Related

Server :: Case Statement With Regular Expressions - Date Manipulation Script

Aug 19, 2010

Here's my need:
If Calendar Day= Then FCPeriod= And FCYear=
Jan 11 to Feb 1002Current Year of Feb 10
Feb 11 to Mar 1003Current Year of Mar 10
Mar 11 to Apr 1004Current Year of Apr 10
Apr 11 to May 1005Current Year of May 10
May 11 to June 1006Current Year of June 10
June 11 to July 1007Current Year of July 10
July 11 to Aug 1008Current Year of Aug 10
Aug 11 to Sept 1009Current Year of Sept 10
Sept 11 to Oct 1010Current Year of Oct 10
Oct 11 to Nov 1011Current Year of Nov 10
Nov 11 to Dec 1012Current Year of Dec 10
Dec 11 to Jan 1001* Current Year of Jan 10

* Note for Dec 11 - Dec 31,
The Next Year to be used
IE: Current date is Dec 28th, 2010. Year = 2011
IE: Current date is Jan 8th, 2011, Year = 2011.
Looks like I'll need a case statement with some regular expressions...

View 9 Replies View Related

Programming :: Java Regex - Use Regular Expressions Find Out What The First Two Characters Of The String Are

Feb 2, 2011

What I am doing is reading the text from a text document and storing all of the text inside of a ArrayList. I then set one of the values of the Arraylist as a string. I want to use regular expressions find out what the first two characters of the String are. if first two characters = "//" then function(); I only care about the first two characters though. If you need any more information, just ask.

View 4 Replies View Related

Hardware :: (OLD) Marian/Sek'D Prodif Plus Driver \shaw Digit I/o, And Don't Need Digit I/o?

Jul 8, 2010

Before i want to buy (OLD) Sek'd Prodif plus soundcard, i want to know, this card is working with Ubuntu 10.04?I found some information in the Alsa page, but i just shaw digit i/o, and i don't need digit i/o, just ANALOG I/O.Somebody can tell me about this card?I really need any information about driver (alsa or oss)

View 1 Replies View Related

OpenSUSE Install :: Change 3-digit Uid To 4-digit?

Dec 28, 2009

I have a new computer on which I have installed suse11. My old computer has suse10. I have copied all my files to move to the new machine and I have the same username on both systems but the uid on my old one is 501 and on the new one it is 1001. know this is going to cause trouble

View 1 Replies View Related

Ubuntu Networking :: Point To Point Tunneling Server Connection Errors?

Mar 28, 2011

I recently installed the pptpd server on my system and set it up according to these instructions:HTML Code[URL]t=132029However after setting everything up on attempting to connect to it from a windows machine (windows 7 home premium to be specific) it gives me two errors which are 720 and 800...It reaches "registering your computer on the network" fine and then gives 720 on the first attempt to connect and then 800 on the second attempt to connect...and then on the third 720 and 4th 800 and so on..My system running the server's I.P is 192.168.1.70My system running the windows OS trying to connects I.P is: 192.168.1.66

View 2 Replies View Related

Ubuntu Networking :: 4 Digit Pin Isn't Enough To Connect?

Jun 9, 2011

I'm staying in a new flat and the landlord told me the widow has a four digit pin. The network shows up as WPAA/WPA2 personal. When I go to enter the pin, 4 digits isn't enough to let me try to connect. She swears that's the passcode

View 1 Replies View Related

Ubuntu Networking :: Why 5 Digit Ports Open In 10.10

Jan 2, 2011

I have been running Ubuntu 10.10 and have found that at any time I am connected to the Internet that I will randomly see high port numbers open when doing a port scan on my computer all are in the unknown listings with five digit numbers so I don't know what is going on or who is using them. Please check your system to see if you are having the same thing happen by using network tools and filling in your local ip address in the port scan tab. If you shut down your Ethernet interface and run port scans the high ports are no longer open. this will at least keep whoever is using your ports at bay when you are not using the net.

View 4 Replies View Related

Ubuntu :: Make A 2(n) Digit Number With Additional Zero(s)

Jun 24, 2011

in terminal: if var = 2 and we write the file name "name$i" it would be "name2" but my file name is "name02" (in fact I wanna have a 'for' loop on about 50 files named: a01, a02, ... , a50)

is there any way to make a 2(n) digit number with additional zero(s) like "%02d" in C ?

View 4 Replies View Related

Ubuntu :: Auto-run Script At Interval?

Jul 30, 2010

I am looking for a script that will, as the title says, run any commandsive it at intervals i set, also at startup.Any help to point me in the directionof a helpful resource or some basics I can add to with direction My searches have proved fruitless so far, and I have no chance of working it out on my own

View 4 Replies View Related

Programming :: Get First Digit Of Each Line?

Nov 24, 2010

I have a file that contains something like this:Quote:

HOURS FROM-TO
------------------------------------
4 10.00-14.00
8 8.00-16.00
10 10.00-20.00

Now, i need to get only the first column, i know how to do that awk '{print $1}', but how can i make an operation with all these numbers? (8+4+10...)

View 3 Replies View Related

Programming :: Replacing The Last Digit?

Jun 23, 2010

i am trying to replace the last digit in the ip address(25) with 47 using following:Quote:echo 192.168.0.25|sed -r s/([0-9]*.[0-9]*.[0-9]*)/47/g'but not able so far, was wondering if you can help, so i can find my mistake.

View 6 Replies View Related

Ubuntu :: Automatically Change Workspaces At Specified Interval?

Mar 14, 2010

I'm wondering if anyone is aware of a way to cycle through workspaces at a set interval.. whether it be a screen saver or other wise

View 3 Replies View Related

Ubuntu Networking :: Point To Point (ad-hoc) SSH Over USB Or Ethernet?

Jun 3, 2010

I was wondering if there is any way to SSH from one computer to another and completely bypass a router or any other network infrastructure. The reason I ask is because my robot ( same one in this post ) often needs to change which wireless network it automatically connects to, however it is getting annoying to have to drag out a monitor and plug it in along with a keyboard and mouse every time this needs to happen. Instead I'd much rather just plug my laptop into the other computer, SSH in and change the network myself.

So I thought I would ask you kind people if this is possible. The robot's computer has unused ethernet and USB ports, and I'd like to use those if at all possible (and with linux, anything is possible! -- sorta). I thought about doing something with ad-hoc, but this would limit my range (in infrastructure mode I can control the thing anywhere there is internet), and is to be avoided.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved