10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am still learning shell scripting. Recently I see a function for read configuration. But some of special character make me confused. I checked online to find answer. It was not successful. I post the code here to consult with expert or guru to get better understanding on these special characters... (3 Replies)
Discussion started by: duke0001
3 Replies
2. Shell Programming and Scripting
I wish to replace "\\n" with a single white space.
The below does the job on command-line:
$ echo '/fin/app/scripts\\n/fin/app/01/sql' | sed -e 's#\\\\n# #g';
/fin/app/scripts /fin/app/01/sql
However, when i have the same code to a shell script it is not able to get me the same output:... (8 Replies)
Discussion started by: mohtashims
8 Replies
3. Programming
co
#! /usr/bin/perl
use strict;
use warnings;
use diagnostics;
my $amount=""; my $bain; ; my $code="";
my $date;my $day;my $line; my $mo; my $LNUM = 0;
my $xyz=""; my $yr;
$yr = 2015;
my $F; my @F;
while (<>) {
chop;
++$LNUM;
@F = split(';');
if ( $F eq "Date" )... (1 Reply)
Discussion started by: hpk
1 Replies
4. Shell Programming and Scripting
Please help me understand how sort -k3,3 -k 4,4 short* works , is it sorting 3 and 4 th field ? what is the use of specifying 3,3 and 4,4 in sort and what is actually does and i see sort -k3 short* and sort -k3,3 -k 4,4 short* giving the same output.
Sort output attached
Please help (2 Replies)
Discussion started by: Antony Ankrose
2 Replies
5. Shell Programming and Scripting
Hi, the following command works in the terminal no problem.
samtools view -h rawlib.bam | perl -ne '{ @line = split( /\s+/ ); $match = 0; while( $line =~ /(\d+)M/g ) { $match = $match + $1 } if( $match >= 80 || $_ =~ /^\@/ ) { print $_ } }' | java -Xmx12G -jar... (8 Replies)
Discussion started by: jdilts
8 Replies
6. Shell Programming and Scripting
Hi is there a way that i can convert this simple perl program into shell script
#!usr/bin/perl -w
use strict;
use warnings;
open INPUTFILE, "uniqprobecoordinates.out" || die "canot open the file $!";
open OUTPUTFILE, ">", "1_4reads.out";
while(<INPUTFILE>)
{
chomp;
... (3 Replies)
Discussion started by: bhargavpbk88
3 Replies
7. Shell Programming and Scripting
so in unix this command works works and shows me a list of directories
find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt
but when i try running a perl script to run this command
my $query = 'find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt';... (2 Replies)
Discussion started by: kpddong
2 Replies
8. Shell Programming and Scripting
How to call a perl script in shell program / shell scripting.
PLS HELP ME (2 Replies)
Discussion started by: hravisankar
2 Replies
9. Shell Programming and Scripting
Hello ,
I want to run some shell scripts in my perl script. I need to read the script's name from a file ( this file includes the name of all the scripts) and run the script one by one.. Please let me know how to go ..
Thanks in advance,
Radha (5 Replies)
Discussion started by: s123.radha
5 Replies
10. Shell Programming and Scripting
Now I am just getting frustrated and confused... if anyone has some advice on how this anomoly is occurring I would greatly appreciate it.
cat helpme.txt | awk 'NR<5{printf("%-20s %-20d %-20d %-20.1f\n","hello",$1,$2,$3)}' | sort -rk4
This line works fine in solo - reads the three fields from... (4 Replies)
Discussion started by: nortypig
4 Replies