rigadicomando.org

Whatever you can cat

Secondary links

  • About
  • Contacts
  • Disclaimer

cdrecord + bladeenc

Submitted by fabio on Tue, 2006-01-10 15:45.
  • bash

Con il seguente comando si estrae l'immagine di un cd audio e si
ottengono 2 files: data.bin contenente i dati grezzi e toc contenente le
informazioni sullo spiazzamento e sulla durata delle singole tracce:

gianz@guybrush:cd-images$ cdrecord read-cd toc
...
gianz@guybrush:cd-images$ ls -l
total 476695
-rw------- 1 gianz users 486224256 Sep 1 23:25 data.bin
-rw------- 1 gianz users 1263 Sep 1 23:25 toc
la rigona di comando é questa:

gianz@guybrush:cd-images$ for i in `seq 1 \`grep -c TRACK toc\`` ; do dd if=data.bin skip=`grep -A 5 "Track $i"$ toc | grep data.bin | awk '{ print( $3); }' | awk -F : '{ print(int((($1*6000+$2*100+$3)*1764)/1024)); }'` count=`grep -A 5 "Track $i"$ toc | grep data.bin | awk '{ print( $4); }' | awk -F : '{ print(int((($1*6000+$2*100+$3)*1764)/1024)); }'` bs=1024 | sox -t .cdr - -t wav - | bladeenc STDIN track$i.mp3 ; done

dopo un po' di tempo questo é ció che ottengo:

  • fabio's blog
  • Read more

up & lower case

Submitted by fabio on Wed, 2006-01-04 16:58.
  • bash
  • perl

Pipe che restituisce caratteri maiuscoli da minuscoli


echo ciao |perl -e 'while (<>) { print uc }'

Muovi tutti i file presenti in una dir da maiuscoli a minuscoli o viceversa ..

for i in `ls` ; do mv $i `echo $i |perl -e 'while(<>) { print lc ;}'` ; done

Muovi tutti i file presenti in una dir da maiuscoli a minuscoli o viceversaanche se contengono degli spazi (Thanks Nando) ..

for i in * ; do mv "$i" "`echo $i | perl -e 'while(<>) { print lc ;}'`" ; done

  • fabio's blog

little perl search engine

Submitted by fabio on Wed, 2006-01-04 16:57.
  • bash
  • perl

Motore di ricerca per piccoli alberi html ;-)


grep -ir 'pattern' path_dove_cercare/*html|awk --field-separator=":" {'print $1;'}|perl-e '$old=""; while() { if ($_ ne $old) {print "$_"} $old=$_;}'

  • fabio's blog

html strip tags

Submitted by fabio on Wed, 2006-01-04 16:54.
  • bash
  • perl

Legge tutti i files html contenuti in una directory [non scende
ricursivamente nelle sottodirectory] eliminandone i tag e li concatena in un
unico file ASCII conservando i commenti HTML.


cat *.htm |perl -e {'while () { s/<.*>//s; print }'} > output_text_file

Idem come sopra ma ricursivo ;-)


find . -iname "*.htm*" |perl -e {'while () { s/<.*>//s; print }'} > output_text_file

  • fabio's blog

kill + fuser

Submitted by fabio on Wed, 2005-12-21 16:37.
  • bash

Il comando netstat (netstat -na --ip) ti rivela che hai una porta aperta (es. 515, lpd) e vuoi chiuderla?


kill -9 `fuser 515/tcp|awk {'print $2 '}`

  • fabio's blog
« first‹ previous12345next ›last »

Navigation

  • Feedback
  • News aggregator

ICT users' rights

  • New Documentary Film "Patent Absurdity: how software patents broke the system"
  • Time for nonprofits to leave proprietary fundraising software systems behind
  • Breaking the dependency on proprietary software: A call to nonprofits to refuse Microsoft Windows 7
  • Why is free software important to you? Submit your response to our new video campaign!
  • FSF works with PayPal to the benefit of the free software community
more

High Scalability Architecture

  • The cost of High Availability (HA) with Oracle
  • Strategy: Order Two Mediums Instead of Two Smalls and the EC2 Buffet
  • Hot Scalability Links for April 16, 2010
  • Parallel Information Retrieval and Other Search Engine Goodness
  • Strategy: Saving Your Butt With Deferred Deletes
more

Debian Security

  • DSA-2038 pidgin
  • DSA-2037 kdm (kdebase)
  • DSA-2036 jasper
  • DSA-2035 apache2
  • DSA-2034 phpmyadmin
more

Drupal Security

  • SA-CORE-2010-001 - Drupal core - Multiple vulnerabilities
more

EFF

  • Congress Must Investigate Electronic Searches at U.S. Borders
  • Betrayed MSN Music Customers Deserve More from Microsoft
  • EFF Report: FBI Slowed Terror Investigation with Improper NSL Request
  • State Secrets Claim Should Not Bury Important Surveillance Lawsuit
  • Courtroom Showdown for eBay Seller Over Promo CD Sales
more

Invent Geek

  • The Meeting Light Project
  • the ion cooler 2.0
  • the ultimate dance pad v1.0
  • The Thermaltake MiniFridge Case Mod
  • Inventgeek gets a facelift and a butt tuck
more

 Privacy | Disclaimer | Drupal | Creative Commons

All content on this site is ditributed under Creative Commons License, each individual author is responsible for its own posts.

RoopleTheme