This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
unset url | |
pattern="([^\w-]clementine)" | |
if ps ux | grep -P $pattern | grep -v grep | grep -vq tagreader; then | |
# $app is running! | |
url=`lsof -F n -c clementine | grep -i "^.*\.mp3$" | sed 's/^n//g'` | |
file=`basename "$url"` | |
# ft it is a mp3 file, get ID3 info | |
title=`id3info "$url" | grep "Title" | sed 's/^===.*[:].//g'` ; title=$(tr -d '\n' <<<"$title") | |
artist=`id3info "$url" | grep "performer" | sed 's/^===.*[:].//g'`; artist=$(tr -d '\n' <<<"$artist") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=head1 NAME | |
stock4.pl No fancy name yet | |
=head1 DESCRIPTION | |
Queries Google Finance to get current stock rates for NSE and NYSE. | |
=head1 DEPENDENCIES |