Visit The New, Modern Unix Linux Community

Search Results

Search: Posts Made By: matrixmadhan
911
Posted By matrixmadhan
I have added sample script for a single file,...
I have added sample script for a single file, please change it to multiple files like

ls file*

Please give it a try and let us know if there are any problems.
911
Posted By matrixmadhan
Please post what have you tried, where are you...
Please post what have you tried, where are you struck.

Here is a sample.

ls 12345-zxys.213423.zyz.txt | while read file
do
newfilename=`echo $file | sed 's/^.*-//'`
mv $file $newfilename...
1,242
Posted By matrixmadhan
The option -C enable compression on the fly for...
The option -C enable compression on the fly for scp command
1,637
Posted By matrixmadhan
If that's an authorized access then you might...
If that's an authorized access then you might potentially have web services with properly defined contracts for the APIs, which will give easier for accessing the link. Otherwise you will have to...
1,637
Posted By matrixmadhan
Let me try to understand. First the link,...
Let me try to understand.

First the link, looks like its a gov link, please make sure that this is not confidential and in view of the terms and conditions / contract, if this is confidential and...
655
Posted By matrixmadhan
Can you please explain what is meant by? ...
Can you please explain what is meant by?

some perl version can use and some can't

What is your expected o/p, what is the i/p?
1,605
Posted By matrixmadhan
You have about 60+ posts but still you are not...
You have about 60+ posts but still you are not using code tags. Can you please edit your post and add code tags?
1,951
Posted By matrixmadhan
Its not $1, its $0 - small change to what you...
Its not $1, its $0 - small change to what you have posted

awk -v l=0 'length($0)>l { l=length($0);rec=$0} END {print l," ", rec}' inputfile
2,253
Posted By matrixmadhan
Am going to repeat this, please do use CODE tags....
Am going to repeat this, please do use CODE tags. It makes reading the code a lot easier.
1,115
Posted By matrixmadhan
I am trying to read some tutorial , but I do not...
I am trying to read some tutorial , but I do not have enough time to do it !

This is not correct. Nobody here has time as well.
So, you have to spend time in learning the tutorial, make your...
2,253
Posted By matrixmadhan
Please use code tags, it only takes less than a...
Please use code tags, it only takes less than a second to wrap your code with CODE tags. Without them, reading the code is difficult.
1,014
Posted By matrixmadhan
This could be done with an one liner in awk using...
This could be done with an one liner in awk using associative arrays. Please search the forum.
Forum: What is on Your Mind? 11-28-2010
1,393
Posted By matrixmadhan
I really like this - and that is how it should...
I really like this - and that is how it should be. Just dont give them access if the elders cant spend time with the kids. It has become increasingly an alarming situation to give free access to...
Forum: Programming 09-05-2010
2,606
Posted By matrixmadhan
Free the file descriptor back to the system and...
Free the file descriptor back to the system and then unlink it.
2,075
Posted By matrixmadhan
Also, these type of questions are answered many...
Also, these type of questions are answered many times in the forum. Please use the search facility of the forum.
1,540
Posted By matrixmadhan
sample filesize=`ls -l output.txt |awk '{print...
sample
filesize=`ls -l output.txt |awk '{print $5 }'`
echo $filesize
sleep 60
filesize_2=`ls -l output.txt |awk '{print $5 }'`
if [ $filesize != $filesize_2 ]
then
echo "not equal, it has...
22,601
Posted By matrixmadhan
A small change please :) A separate rows...
A small change please :)

A separate rows variable is not needed, just this would do
awk -F, ' NR > 1 { sum += $2 }END{ print NR-1, sum }' filename
29,009
Posted By matrixmadhan
variant kill $(ps ax | awk '/rv_/ {print...
variant

kill $(ps ax | awk '/rv_/ {print $1}')
3,558
Posted By matrixmadhan
No need to redirect output of $? to a file "A"...
No need to redirect output of $? to a file "A" and then grep from that.
Instead use it directly in 'if' block

if [ $? -eq 0 ];
then
# stuff to do
fi
6,423
Posted By matrixmadhan
filter ? homework ?
filter ?

homework ?
53,509
Posted By matrixmadhan
Well, this is also one of the way to do that. ...
Well, this is also one of the way to do that.

The other one I had posted should also work :)
66,838
Posted By matrixmadhan
echo "NLL_NAM_XXXXX.XXXXXXX_1_1.txt" | sed...
echo "NLL_NAM_XXXXX.XXXXXXX_1_1.txt" | sed 's/_[0-9].*.*$//;s/^.*_//'
50,208
Posted By matrixmadhan
Check for any space between '<<' and EOF at line...
Check for any space between '<<' and EOF at line 19

and whether 'EOF' starts exactly at the beginning of the line
64,948
Posted By matrixmadhan
Not tested though ! :) :p Try and let us...
Not tested though ! :) :p

Try and let us know for any problems!

#! /opt/third-party/bin/perl

my($content, $length);

open(FILE, "< sample") || die "Unable to open file small. <$!>\n";
...
6,853
Posted By matrixmadhan
Please use the search facility. Mailx had...
Please use the search facility.

Mailx had been answered many times :)
Showing results 1 to 25 of 28

 

Featured Tech Videos

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