I need a non-perl (bash) way to strip the path from a list of "find" results. Below is the perl version which I could use, if I could figure out how to call the script with a variable (like in sh, $1 is the variable passed in ./script variable)
$file = "/path/to/file.txt";
# How do I... (2 Replies)
I'm writing a script to automate some post-install tasks on RHEL4 servers.
I need the following code to insert an 'A' in the middle of a string, then replace the string in a file. I know I can use sed to do this, but I'd like to use perl's in place edit so I don't have to write to a temp file,... (1 Reply)
Hi there,
I am trying to call a shell script from a Perl script. here is the code:
@args = ("sh", "someshellprg.sh", "a file handler", "an array");
system(@args) == 0
or die "system @args failed: $?";
in the shell program, I examine if the arguments exits using:
if
then echo... (5 Replies)
I have a script (say script1.sh ) and I am calling a script (say script2.sh) within the script1.sh. Here in script1.sh I have a hash ( say %hash1) and i have to pass this hash to script2.sh. Basically i have to do some processing in Scirpt2.sh based on the hash(key,values). I wanted to know how can... (2 Replies)
Hi All,
I am trying to pass an argument called "Pricelist" to a Perl function, then the function will open and print out the contents of the file named "Pricelist". But i can't seem to do it using my below code. Can any expert give some advice?
#!/usr/local/bin/perl
$DATABASE =... (1 Reply)
Hi ,
This script working for fine if pass script-name.sh Jul/10/2007 ,I want to pass 20070710(yyyymmdd) .Please any help it should be appereciated.
use Time::Local;
my $d = $ARGV;
my $t = $ARGV;
my $m = "";
@d = split /\//, $d;
@t = split /:/, $t;
if ( $d eq "Jan" ) { $m = 0 }... (7 Replies)
Greetings all,
If I have a SH script that calls a PERL script in the following way:
perl $HOME/scripts/config.properties
And in the config.properties PERL file, this Perl script only sets a number of environmental parameters in the following way:
#!/usr/bin/perl
$VAR1 = (
... (3 Replies)
Semi-newbie, so flame throwers to 'singe-only', please. ;-)
I have a large number of (say) .html files, where I'd like to do a recursive in-place search and replace a particular string. The following bit of perl works fine:
perl -pi -e 's/oldstring/newstring/g' `find ./ -name *.html`
... (2 Replies)
I am working on converting shell to Perl script. In shell we have built in function
trap
Do you know alternative in Perl or actually we don't need it?
Thanks for contribution (3 Replies)
Discussion started by: digioleg54
3 Replies
LEARN ABOUT DEBIAN
gcstar
GCSTAR(1) Linux User's Manual GCSTAR(1)NAME
GCstar - Personal collection manager
SYNOPSIS
gcstar [-u UPDATE-OPTIONS] [-x EXECUTE-OPTIONS] [FILENAME]
DESCRIPTION
GCstar is a Gtk2 program used to manage personal collections.
OPTIONS
Without any option, it will open FILENAME if specified or the previously opened file. There are also two groups of options.
UPDATE-OPTIONS
-u, --update
Tell GCstar to look for available updates
-a, --all
Update all components
-c, --collection
Update collection models
-w, --website
Update plugins to download information
-i, --import
Update plugins to import data
-e, --export
Update plugins to export data
-l, --lang
Update translations
-n, --noproxy
Don't ask for a proxy
EXECUTE-OPTIONS
-x, --execute
Enter non-interactive mode
-c, --collection MODEL
Specify the collection type
-w, --website PLUGIN
Specify the plugin to use to download information
-i, --import PLUGIN
Specify the plugin to use to import a collection
-e, --export PLUGIN
Specify the plugin to use to export the collection
-f, --fields FILENAME
File containing fields list to use for import/export
-o, --output FILENAME
Write output in FILENAME instead of standard output
--download TITLE
Search for the item with TITLE as name
--importprefs PREFERENCES
Preferences for the import plugin
--exportprefs PREFERENCES
Preferences for the export plugin
Preferences for import/export plugins are specified using this schema
Key1=>Value1,Key2=>Value2
ENVIRONMENT
HOME Used to define following variables if needed
XDG_CONFIG_HOME
Where configuration files should be stored. If not defined: $HOME/.config
XDG_DATA_HOME
Where some data will be stored. If not defined: $HOME/.local/share
BUGS REPORTING
To report bugs, please use this forum:
http://forums.gcstar.org/viewforum.php?id=4
AUTHORS
Tian <tian@c-sait.net>
http://www.gcstar.org/
GCstar 17 August 2006 GCSTAR(1)