Since 4/2/2012 5:38:13 AM, sharma__r has written 9 articles and participated in 27 conversations. sharma__r signature: sharma__r
sharma__r's articles:
Items(9) /1
Restart tcl script with the correct version023 (8/5/2012 8:00:35 PM) comp.lang.tcl Hi,
Is it possible to restart a tcl script (this is for a linux system) in
case the version of the tclsh interpreter is incorrect
and the tcl code can fix itself & re-launch itself by some exec/open
or some... sharma__r
List Separator $, behaving oddly1359 (2/18/2011 9:42:39 AM) comp.lang.perl.misc hello all,
when we set the $, punctuation variable two different ways we get
different behaviors.
perl -e '
# this does not work
local *{"::,"} = \do{q[:]};
print "\$,=[$,]\n";
print "A", "B", "C"; #... sharma__r
Make stderr -> stdout & stdout -> /dev/null8761 (3/26/2010 7:02:10 PM) comp.unix.shell How do I make the STDERR go to STDOUT whilst nullifying the STDOUT
from
any command?
This doesn't work:
command 3>&1 1>&2 2>&3 3> /dev/null
I am going thru this rigamarole as I want to test... Rakesh
Difference between "$var" and $var?18203 (12/18/2009 6:42:34 PM) comp.lang.perl.misc Hi,
Is there any advantage in the assignment operation
$dest = "$src" over
$dest = $src ?
And then, are the following operations identical?
$dest = "$varA:$varB:$varC";
$dest = join ":", $var... sharma__r
How to get at the perl options2476 (11/19/2009 6:49:57 PM) comp.lang.perl.misc Hi,
Is there a way to capture the perl options in a command like this:
perl -w -S script.pl
@ARGV holds the options script.pl & onwards. What I want are the the
perl options (in this case:
-w, -S ) ... sharma__r
on Code references859 (1/21/2009 8:13:17 AM) comp.lang.perl.misc Hi Perl gurus, I am having trouble with calling subroutines using a reference variable. #!/usr/local/bin/perl use 5.8.0; use strict; use warnings; # anonymous subroutine stored in a reference variable my $re... sharma__r
Find all variables used.068 (5/19/2008 1:58:40 AM) comp.lang.perl.misc Hi, Is there a way (apart from grepping) to list out all the variables (viz., scalars/array/hashes/code/etc.) that have been declared &/or used in a perl program? The variables are of the package/lexical/local... sharma__r
/e option in the s/// command248 (6/5/2007 10:34:07 AM) comp.lang.perl.misc ############################# use strict; use warnings; my $var = "''''''''''''"; my $p_pulse = q{./\\}; my $n_pulse = q{'\\/}; my $knt = 1; print $var; $var =~ s/^((...){$knt}).../$1 . (($1 =~ m{'}) ? $n_... sharma__r
about matching in a list context360 (10/9/2006 12:14:01 PM) comp.lang.perl.misc Hello, I don't understand this behavior of perl: perl -lne 'print for /^(\d+\.\d+E-\d+)$/;' 4.62972E-13 4.63098E-13 4.62983E-13 Whereas if I do this : perl -lne 'print for /^\d+\.\d+E-\d+$/;' I get (fr... sharma__r
comment out all lines in a file1030 (10/7/2004 6:53:00 PM) comp.unix.questions Hi, I have a file that is a few hundred lines long. Sometimes I need to comment out all of the lines in the file by placing a "#" charager at the beginning of each line. I'm sure there is a single command th... michael_matthes(2)
Creating a Directory Listing418 (11/1/2004 7:04:00 PM) comp.unix.questions have a class assignment to "provide the command to create a Directory Listing (I.e. NO files) of the ENTIRE schools UNIX system." the best I can work out is: ls -ap | grep / > file1 ; cat file1 This works fo... wk17(2)
fixed-width unique sort problem315 (11/15/2004 5:41:25 AM) comp.unix.questions I'm working with a fixed-width file that looks like this: 31234 91235 71235 Notice that each record has an identical 3-character key of '123'. I'm trying to use sort to get rid of the duplicates -- so I want... eostermueller(5)
find/grep file extensions616 (11/29/2004 10:38:39 PM) comp.unix.questions I'm trying to set up a command like: find . -name "*.[fcChb]" -exec grep \!* /dev/null \{\} \; where it will look for all files with the suffixes of "fcChb". That works fine. However, I want to add files li... nospam21(11322)
output from cut command813 (1/11/2005 11:20:54 PM) comp.unix.questions Hi, I have been using this command to extract the unique data from a file: cut -c1-6 filea |sort -u I'd like the output to ignore any blanks or empty fields. Just not sure how to get around that. Is there ... Shawn
Variable substitution in sed with pathname431 (1/14/2005 4:34:27 PM) comp.unix.questions How do I do a simple variable substitution in sed with a value that is a pathname ie includes slashes? This fails in ksh and bash: VPATH=/foo/bar sed -e "s/EXECPATH=.*/EXECPATH=${VPATH}/"tmpconfigfile with e... red_valsen(22)
sed question #33821 (8/20/2011 6:16:41 AM) comp.unix.shell Let say a file with a few lines of text. I need to write a sed command that will duplicate each line in the output. This means each line must be printed twice. I can do the following: $ sed 'p' filename How c... hsteenkamp(7)
Redirect sqlplus output into a variable in tcsh script1498 (9/12/2011 10:11:05 AM) comp.unix.shell hello, I'm running a simple silent sqlplus command from a tcsh script. How can I redirect the select output into a variable (not a file)? Operating system: SunOS -----------------------------------------------... shulamitmi(26)
[sed challenge] Alternative to xargs -n32631 (9/25/2011 7:42:03 PM) comp.unix.shell Hi, since I have to pipe output from 'sed' to 'xargs -n 3', I wondered wether I could achieve the same result without leaving 'sed' by adding some more expression. I did it, and it doesn't seem to be quicker, b... kax(41)