Search Results

Search: Posts Made By: MobileUser
23,832
Posted By MobileUser
Sort and Unique in Perl
Almost same as MatrixMadhan's. Row count was not included, so the following code is just for completeness:

#!/usr/bin/perl -w
use strict;

# Program to get unique values for 3rd column and...
29,940
Posted By MobileUser
Perl split function
Hi,
It should work fine. I tried the following...

#!/usr/bin/perl -w
use strict;

# Program to accept a file path and store it in a array

my $dir = "/abc/def/ghi/";

my @Dir =...
2,625
Posted By MobileUser
Probably the following is what you need ...
Probably the following is what you need

$var1 =~ m/ERROR: Make.*java.*as enabled/g
5,035
Posted By MobileUser
Executing application on Windows from Unix machine
I'm using ssh to connect with Windows from Unix. The command is given below

ssh -X username@servername

I do not have SSHD running on Windows machine. My purpose is also to bypass the password...
5,035
Posted By MobileUser
Executing application on Windows from Unix machine
I have two machines, one running Windows and another one Unix over a network. I want to execute a batch file on the Windows machine using a script running on the Unix machine.

I have tried...
15,164
Posted By MobileUser
Thanks anbu23. That's what I needed.
Thanks anbu23. That's what I needed.
15,164
Posted By MobileUser
Sorting based on columns
I tried with...

(blank space) Abc Acc
Bca Bda Bdd
(blank space) (blank space) Cbc
Dbc Dca Dda
Abc Abc Acc

I don't get...

Abc Abc Acc
(blank space) Abc Acc
Bca Bda Bdd
(blank space)...
15,164
Posted By MobileUser
The example given was not a good one I think....
The example given was not a good one I think. Basically, some columns can be empty and every row should also be arranged alphabatically.

Try...

Abc Acc
Bca Bda Bdd
Cbc
Dbc Dca...
15,164
Posted By MobileUser
Sorting based on columns
Hi,
I want a list of entries in 3 space delimited columns. I want to sort entries based on the very first column. Rows can't be changed. For example:

If I have...

Abc Abc Acc
Bca Bda Bdd...
7,254
Posted By MobileUser
We use Winzip to create a destination path with a...
We use Winzip to create a destination path with a specific suffix for individual zipped files on Windows. Just wanted to automate the same for multiple zipped files using a perl script.
7,254
Posted By MobileUser
Calling Winzip from perl script
Hi,
I would like to invoke "Winzip" utility from a perl script, input the name of zip file and provide output path for unzipped files. Any pointers will be appreciated.


Thanks
8,493
Posted By MobileUser
I noticed that I the file specified on the...
I noticed that I the file specified on the command line will be read line by line. I modified the script as below but it still does'nt work. Can there be some problem with file permissions?
...
8,493
Posted By MobileUser
Re: String replace perl script error
The file, "input.txt" contains the following string:

This is the text I wrote

To start with, I want to replace the word "This" with "I did it".
8,493
Posted By MobileUser
String replace perl script error
I have written down a simple perl program to replace a string from a word file. My script does'nt seem to work. Any pointers to make it work will be appreciated. The code is given below.

...
6,749
Posted By MobileUser
Command to select files with different extensions
I want to select files which have different extensions such as .cpp, .cs, .h

I can select one of them as

find . -name "*.cpp"

but I want to select all of them in one command only. It should...
5,329
Posted By MobileUser
Line counting in Directory (Working Code)
My mistake about the expression. It should have been:
find $1 -name "*.[ch]"

Your suggestion with while did not work properly. I did some modification and it worked!! The code is as follows:...
5,329
Posted By MobileUser
Line counting in Directory
I want to count the no of lines for files (.c and .h) present in a directory structure.
My code is:


#!/bin/bash
# Usage: linecount.sh directory_name
for file in $(find $1 -name [*.ch]); do...
Showing results 1 to 17 of 17

 
All times are GMT -4. The time now is 10:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy