10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Greetings!
I've been tooling about with Perl to make a few string replacements in some files; and seem to have run into a bit of a squeeze :)
Beginning with a simple text file, test.txt, we have the following content to be worked:Now, not wanting to have anyone feel left out, I decided that... (6 Replies)
Discussion started by: LinQ
6 Replies
2. Shell Programming and Scripting
Hello,
I'm completely new to Perl and I'm just looking for a quick answer to some code I'm trying to come up with. I'm trying to access a website, part of the URL I want the user to be able to define via standard input. As you can see below I'm still trying to get the syntax.
... (2 Replies)
Discussion started by: wxornot
2 Replies
3. Red Hat
Cheers!
In /etc/syslog.conf, if an error type is not specified, is it logged anywhere (most preferable is it logged to /var/log/messages) or not?
To be more precise I am interested in error and critical level messages. At default these errors are not specified in syslog.conf, and I need to... (6 Replies)
Discussion started by: dr1zzt3r
6 Replies
4. Shell Programming and Scripting
Hello all!
This is my first post and I'm very new to programming. I would like help creating a simple perl or bash script that I will be using in my work as a junior bioinformatician.
Essentially, I would like to take a tab-delimted or .csv text with 3 columns and write them to a "3D" matrix:
... (16 Replies)
Discussion started by: torchij
16 Replies
5. UNIX for Dummies Questions & Answers
Right now, my code is:
s/Secondary Ins./Secondary Ins.\
1/g
It's adding a 1 as soon as it finds Secondary Ins.
Primary Ins.: MEDICARE B DMERC Secondary Ins.
1: CONTINENTAL LIFE INS
What I really want to achieve is having a 1 added on the next line that contain "Secondary Ins." It... (4 Replies)
Discussion started by: newbeee
4 Replies
6. Shell Programming and Scripting
Hi ,
I just write a simple function to read the file line by line.
But when I run it it says out of memory.
I am not sure about the root cause, Can someone help me out of this?
:D
#! /usr/bin/perl
use strict;
sub checkAPs{
my $NDPDir = "/home/eweiqqu/NCB/NDP_files/";
... (1 Reply)
Discussion started by: Damon_Qu
1 Replies
7. Shell Programming and Scripting
hi all , i have a requirement like this..
this just a sample script...
$ cat test.sh
#!/bin/bash
perl -e '
open(IN,"addrss");
open(out,">>addrss");
@newval;
while (<IN>)
{
@col_val=split(/:/);
if ($.==1)
{
for($i=0;$i<=$#col_val;$i++)
{
... (2 Replies)
Discussion started by: tprayush
2 Replies
8. Shell Programming and Scripting
I am totally new to perl. I am modifying someone else's script. I have the following output:
# ./some-perlscript
A
B
C
D
E
B - E, is generated through the print command that I put in the script. I want to remove A, it seems it is generated automatically by a custom OS it is querying when... (3 Replies)
Discussion started by: streetfighter2
3 Replies
9. Shell Programming and Scripting
Hi there, i have been trying different methods and i wonder if somebody could explain to me how i would perform a comparison on two arrays for example
my @array1 = ("gary" ,"peter", "paul");
my @array2 = ("gary" ,"peter", "joe");
I have two arrays above, and i want to something like this... (5 Replies)
Discussion started by: hcclnoodles
5 Replies
10. Programming
This is a simple question...
char *str = NULL;
int num = 0;
scanf ("%d", &num);
str = ???
I want str to point to the string num.txt
For e.g: If user enters num = 5,
str should point to "5.txt"
How do I do that ?
Thanks (2 Replies)
Discussion started by: the_learner
2 Replies