You are not logged in.

#1 2004-12-13 11:31:39

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

bash scripts with rox

in rox-filer you can "send" files to bash scripts by right clicking on them and selecting the script.  for example:

mogrify -format jpg $1

i use these scripts all the time and they are really handy but they are limited.

$1 uses the whole path and filename so it is almost impossible to do simple renaming or copy a file to a server without it being copied to /targetdir/fullpath/filename, for example.

I am trying to work out how to get the filename into my scripts - with the full path - and then chop it up into path, filename, extention.  i read about word modifiers in bash e.g. !$:h - which works great on the command line but not in scripts - any ideas?

Offline

#2 2004-12-13 11:59:55

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: bash scripts with rox

You mean dirname, basename commands?

This should be what you are looking for (I hope):
http://www.splike.com/howtos/bash_faq.html

Offline

Board footer

Powered by FluxBB