rigadicomando.org

Whatever you can cat

Random Quote

Richness is the quality of Being.

• Osho

Secondary links

  • About
  • Contacts
  • Disclaimer

Home

scripts

How do you rename files with a certain pattern in bash?

Submitted by admin on Mon, 2006-05-29 09:25.
  • bash
  • scripts

How do you rename files with a certain pattern in bash?

for i in *ABC*
do
new=$ ( echo $i | sed ’s/ABC/DEF/’ )
mv $i $new
done

Thanks Live from Yokohama

  • admin's blog

Print all ANSI colors

Submitted by admin on Mon, 2006-05-08 07:59.
  • bash
  • scripts

(from http://wiki.splitbrain.org/shellsnippets)

for i in 30 31 32 33 34 35 36 37 39
do
for j in 40 41 42 43 44 45 46 47 49
do
   # skip if same fore- and backgroundcolor
   if [ $j -eq $[ i + 10 ] ]; then
     continue
   fi
   echo -e $i $j "\033[${i};${j}mCOLOR\033[0m"
done
done

  • admin's blog

How to list duplicate lines in a text file, with counts next to each unique line

Submitted by admin on Mon, 2006-05-08 07:40.
  • bash
  • scripts

from:

How to list duplicate lines in a text file, with counts next to each unique line - [spugbrap's random notes geek blog] [del.icio.us (bash)]

At some point, last year (it's been in my 'toblog' file all this time), I needed to analyze the lines in a text file, removing duplicate lines, while counting how many times each duplicated line occurred within the file, and sorting from most common to least common.

  • admin's blog
  • Read more

Script per prelevare in automatico gli sms da un modem GSM

Submitted by admin on Tue, 2006-02-21 10:56.
  • general
  • scripts

Riporto qui una richiesta di Mauro:

Ragazzi, ho un problema,
vorrei sapere come si fanno ad estrarre gli SMS da una sim card su un modem GSM.Il tutto deve essere fatto in automatico (che so, ad intervalli di un minuto).
Conoscete la risposta sia per Windows che per Linux?
GRazie Ciao

"Leggi Argomenti" template per script

Submitted by fabio on Tue, 2006-01-31 13:55.
  • bash
  • scripts

Template per script che legge argomenti da riga di comando:

#!/bin/bash

# FUNCTIONS

function help () {
cat <<EOF
Command:         `basename $0`
Syntax:          `basename $0` [ -h ]
Description:     Descrizione script
Options:         -h help (questo help)
                 -a Opzione "A"
                 -b Opzione "B"
EOF
}

# VARIABILI

# OPZIONI

while getopts ha:b: var
do
  case $var in
      h) help; exit
          ;;
      a) echo "Opzione "-a" con argomento $OPTARG";
          ;;
      b) echo "Opzione "-b" con argomento $OPTARG";
  esac
done
shift ` expr $OPTIND - 1 `

  • fabio's blog
  • Read more

LinkShare  Referral  Prg

CheapOair.com

tags in Arguments

administrivia bash Debian GNU/Linux OS emacs howto perl scripts web
more tags

Navigation

  • Feedback
  • News aggregator

ICT users' rights

  • FSF and Stephen Fry celebrate the GNU Project 25th anniversary
  • Spring 2008 Bulletin available online
  • Submit your nominations for the 2008 Free Software Awards
  • FSF demonstrates iPhone's incompatibility with free software and GPLv3
  • Atheros releases free software wireless driver; no binary blobs
more

High Scalability Architecture

  • Latency is Everywhere and it Costs You Sales - How to Crush it
  • MapReduce framework Disco
  • What CDN would you recommend?
  • SMACKDOWN :: Who are the Open Source Content Management System (CMS) market leaders in 2008?
  • 37signals Architecture
more

Debian Security

  • DSA-1634 wordnet
  • DSA-1633 slash
  • DSA-1632 tiff
  • DSA-1631 libxml2
  • DSA-1630 linux-2.6
more

Drupal Security

  • SA-2008-048 - CCK - Cross site scripting
  • SA-2008-047 - Drupal core - Multiple vulnerabilities
  • SA-2008-046 - Drupal core - Session fixation
  • SA-2008-045 - OpenID - Multiple vulnerabilities
  • SA-2008-044 - Drupal core - Multiple vulnerabilities
more

EFF

  • FBI Withdraws Unconstitutional National Security Letter After ACLU and EFF Challenge
  • EFF and Sheppard Mullin Defend Wikipedia in Defamation Case
  • 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
more

Invent Geek

  • the ion cooler 2.0
  • the ultimate dance pad v1.0
  • thermaltake sponsors inventgeek
  • 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