Hello all,
I used to have a great script and I lost it :(
What the script did was searched a directory named say "music"
It searched all sub directories for .mp3 files
Then placeed all the .mp3's into a directory of the band name
It also renamed the .mps "track#, band name, album name" (I... (9 Replies)
Hi,
I'm fairly new at scripting.
I need to write a script that takes files from a source directory puts them in a target directory and sorts them by artist name.
This is what I have so far
#!/bin/bash
source_dir='/home/tcindy/songs'
target_dir='/home/tcindy/music'
for path in... (2 Replies)
How can view log messages between two time frame from /var/log/message or any type of log files.
when logfiles are very big and especially many messages with in few minutes, I would like to display log messages between 5 minute interval.
Could you pls give me the command? (1 Reply)
I have three directories CspInterp, FpnInterp and LinInterp.
Each directory contains 4 .h and .ccp files describing 4 classes each
CspInterp
class CspFsInterp1d : public FsInterp1d
class CspVsInterp1d : public VsInterp1d
class CspFsInterp2d : public FsInterp2d
class CspVsInterp2d : public... (10 Replies)
hey im trying to get the hex diffrences in two files ones called new and the other is named old i want it to phrase into my script,
heres how i need the info:
input='\x'94 #the new 1 byte hex change
offset=00000000 #the 1st offset of the difference
patch
unset input offset
input='\x'34... (5 Replies)
AM in need of some plugin/script that can monitor HP-UX file "/var/opt/resmon/log/event.log" .
Have written a scrip in sh shell that is working fine for syslog.log and mail.log as having standard format, have interrogated that to Nagios and is working as I required .
But same script failed to... (3 Replies)
Hi I have a file passwd_exmpl that contains:
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync... (5 Replies)
I have an output file in the form
Hostname
Value1=abc
Value2=def
Value3=xyz
Hostname1
Value1=abc1
Value2=def1
Value3=xyz1
Hostname2
Value1=abc2
Value2=def2
Value3=xyz2
|
|
|
And so on…..
I need to export this output into csv so then it should be in format (8 Replies)
Discussion started by: rahul2662
8 Replies
LEARN ABOUT OSF1
escape
escape(1) Mail Avenger 0.8.3 escape(1)NAME
escape - escape shell special characters in a string
SYNOPSIS
escape string
DESCRIPTION
escape prepends a "" character to all shell special characters in string, making it safe to compose a shell command with the result.
EXAMPLES
The following is a contrived example showing how one can unintentionally end up executing the contents of a string:
$ var='; echo gotcha!'
$ eval echo hi $var
hi
gotcha!
$
Using escape, one can avoid executing the contents of $var:
$ eval echo hi `escape "$var"`
hi ; echo gotcha!
$
A less contrived example is passing arguments to Mail Avenger bodytest commands containing possibly unsafe environment variables. For
example, you might write a hypothetical reject_bcc script to reject mail not explicitly addressed to the recipient:
#!/bin/sh
formail -x to -x cc -x resent-to -x resent-cc
| fgrep "$1" > /dev/null
&& exit 0
echo "<$1>.. address does not accept blind carbon copies"
exit 100
To invoke this script, passing it the recipient address as an argument, you would need to put the following in your Mail Avenger rcpt
script:
bodytest reject_bcc `escape "$RECIPIENT"`
SEE ALSO avenger(1),
The Mail Avenger home page: <http://www.mailavenger.org/>.
BUGS
escape is designed for the Bourne shell, which is what Mail Avenger scripts use. escape might or might not work with other shells.
AUTHOR
David Mazieres
Mail Avenger 0.8.3 2012-04-05 escape(1)