10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a perl variable which contains the below value.
$var1 = "2% / 51%"
Now I would like to split the data into 2 different variables.
For example
$part1 = 2
$part2 = 51
Could anyone please help me in this regard ?
Regards,
GS (4 Replies)
Discussion started by: giridhar276
4 Replies
2. Shell Programming and Scripting
Hi,
I'm trying to split a large file into several smaller files
the script will have two input arguments argument1=filename and argument2=no of files to be split.
In my large input file I have a header followed by 100009 records
The first line is a header; I want this header in all my... (9 Replies)
Discussion started by: ramky79
9 Replies
3. Shell Programming and Scripting
Hi there,
I have an output from a command like this
# ypcat -k netgroup.byuser| grep steven
steven.* users_main,users_sysadmin,users_global,users_backup_team
and wanted to pull the 'users' netgroups returned into a perl array, that will look like this
users_main... (2 Replies)
Discussion started by: rethink
2 Replies
4. Shell Programming and Scripting
in bash:
LIST=`cat $1`
for i in $LIST
do
...
done
how will i do this in perl ?
$1 is my first arguement. I'm a newbie in perl and will appreciate much your help guys ... (4 Replies)
Discussion started by: linuxgeek
4 Replies
5. Shell Programming and Scripting
Hi All,
I want to run a bash script using perl. But they are in the different dir.
#! /usr/bin/perl -w
use strict;
my $root=`pwd`;
chomp($root);
my $cmd=".$root/testdir/ft_623.sh 3 4 5 6 7";
print $cmd;
my @line=`$cmd`;
foreach (@line){
print $_;
}
ft_623.sh (0 Replies)
Discussion started by: Damon sine
0 Replies
6. Shell Programming and Scripting
i wanna passing an argument which read in a file or a set of files if the files are given in the command line, otherwise use STDIN if no file argument.
i got something like that, but it is not really working.
so can anyone help me? which one is better to use for and how? Use perl.
Thank you
... (0 Replies)
Discussion started by: mingming88
0 Replies
7. Shell Programming and Scripting
Hi,
I am extracting SQL queries into a file and the file is as follows
*********************************************************
select BatchKey ,restartStatus ,batchContextBuffer ,batchPgmId ,StartKey ,
EndKey ,Mcbatchcontrol_ver
from
qsecminload.Mcbatchcontrol_t where RefId = :1 ... (5 Replies)
Discussion started by: sagarbsa
5 Replies
8. Shell Programming and Scripting
Let's say I have a very long string with no spaces but just words stored in $very_long_string.
$very_long_string = "aaaaaaaaaaabbbbbbbbbbbccccccccccccdddddddddddd";
I can do this to split the string into 1 character each and store them in an array:
@myArray = split(//, $very_long_string); ... (3 Replies)
Discussion started by: teiji
3 Replies
9. Shell Programming and Scripting
Hi,
I have to check whether an argument say $ARGV is not null in an if operator. Please let me know the operator. It would be great if you write a psuedo code.
Thanks in advance
Ammu (4 Replies)
Discussion started by: ammu
4 Replies
10. Shell Programming and Scripting
I am trying to split input that looks like
,2005-09-12 01:45:00.000000,2005-09-12 01:48:18.000000,
I want to split on the dot .
What I am using is ($ev_time,$rol)=split(/\./),$inputfile;
This does not recognize the dot as what I want to split on. (2 Replies)
Discussion started by: reggiej
2 Replies