10 More Discussions You Might Find Interesting
1. Programming
My issue is that the perl script (as I have done it so far) created empty branches when I try to check some branches on existence.
I am using multydimentional hashes: found it as the best way for information that I need to handle. Saing multidimentional I means hash of hashes ... So, I have
... (2 Replies)
Discussion started by: alex_5161
2 Replies
2. Shell Programming and Scripting
Hi,
I am creating a shell script which will check the processing of the main script if the error count is more than 2% of the record count in a feed. Part of the code is below:
err_tol=`echo $feed_cnt \* 0.02 |bc`
while read line
do
err_cnt=$(grep -i "$line" $err_log | wc -l)
... (5 Replies)
Discussion started by: member2014
5 Replies
3. Shell Programming and Scripting
i have a file that contains information such as this:
hostname.sky.net === 12.39.59.35
hostname.sky.net === 12.39.59.35
hostname.sky.net === 12.39.59.35
hostname-newyork.sky.net ==== 13.45.35.24
hostname-newyork.sky.net ==== 13.45.35.24... (3 Replies)
Discussion started by: SkySmart
3 Replies
4. Shell Programming and Scripting
Can anyone tell me if it's possible to write a script that will repeat the same job several times but give the output a slightly different name each time (i.e. change or add a number at the end of the output file)? Here is the script I use to run a single job:
#!/bin/bash
#PBS -N job0
#PBS -l... (1 Reply)
Discussion started by: peterjb100
1 Replies
5. UNIX for Dummies Questions & Answers
I want to have a string which has n blank spaces
For example
set N = 3
create str = " "
So the length depends on the value of N. I am in tcsh. (4 Replies)
Discussion started by: kristinu
4 Replies
6. Shell Programming and Scripting
hi all,
i was wondering if there is an easy and smart way of greping for requestname (in bold below) from xml output from application log file on a solaris 10 system.
The requestName is the actual method name which gets called e.g it could be 'getAccount' or getId or getAddress etc etc
... (1 Reply)
Discussion started by: cesarNZ
1 Replies
7. Shell Programming and Scripting
Good morning!!
Im trying to create a script that should get a list of numbers from the user (using STDIN or a list of arguments), and call my library function.
My script:
#!use/bin/perl
require 'my-lib.pl';
@userArray = <STDIN>;
while()
{
chomp;
last if ! /\d/;... (1 Reply)
Discussion started by: bigben1220
1 Replies
8. Shell Programming and Scripting
Hi friends, I am working on a perl script to count the commented lines, blank lines and source lines separately. Let me know if you have one. For example i have a file containing the lines:
/**
* SOURCE CODE
*/
public class SessionConstants {
/**
* Code for Session created
*/... (4 Replies)
Discussion started by: nmattam
4 Replies
9. Shell Programming and Scripting
I write a script with register and login user.
So, i encrypt password with
encryptedpass=`perl -e "print crypt("${mypass}",salt)"`
if password do not contain blank space, it work
but if password have blank space, it cause error in that line
the error is:
syntax error at -e .....
Anyone... (3 Replies)
Discussion started by: WuZun
3 Replies
10. Shell Programming and Scripting
Dear All,
I am looking for an option in perl using which i could delete empty lines in a file.
Or
the alternative of sed '/^$/d' <filename> in perl. Sed is not working in my perl script :(
Pls help me out .
Thanks,
VG (4 Replies)
Discussion started by: vguleria
4 Replies