Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: pseudocoder
Forum: Solaris 02-10-2012
2,966
Posted By pseudocoder
Great! :b: ---------- Post updated at 21:48...
Great! :b:

---------- Post updated at 21:48 ---------- Previous update was at 21:39 ----------



wtf?! :confused:

If you intended to help me, be sure you didn't.

If you need help,...
Forum: Solaris 02-08-2012
13,243
Posted By pseudocoder
Hi. You obviously(!) run in a timeout. The reason...
Hi. You obviously(!) run in a timeout. The reason is because it takes far to long to download it.
When you enter the oracle.com site you submit some credentials and then you are allowed to perform...
Forum: Solaris 02-07-2012
13,243
Posted By pseudocoder
Does oracle really want us to download it ? ...
Does oracle really want us to download it ?

Nope, you can simply buy it :p...
2,313
Posted By pseudocoder
Corona688's answer is pretty right, but don't...
Corona688's answer is pretty right, but don't forget to chomp!
chomp removes the newline character from the end of line.
chomp($LINE);
the line input operator includes the newline at the
end of...
1,855
Posted By pseudocoder
find . -name "example.xml" 2>/dev/null -exec grep...
find . -name "example.xml" 2>/dev/null -exec grep -l Version "{}" \;

Try this ^^, it will only print the filename, where the search string is being found.
If that works, try this command without...
1,057
Posted By pseudocoder
awk '$3=="=" && $5=="nm" {print}' infile Edit...
awk '$3=="=" && $5=="nm" {print}' infile
Edit (improvement):
awk '$1=="Column1" || $3=="=" && $5=="nm"' infile
Forum: IP Networking 07-06-2010
2,004
Posted By pseudocoder
Make sure you also adjust the entries in...
Make sure you also adjust the entries in /etc/hosts
2,998
Posted By pseudocoder
I'd first split the file after every 3 lines,...
I'd first split the file after every 3 lines, like so:
split -l3 file
In this case 2 files are produced: xaa xab

for i in x*; do
awk 'NR == 1 { l1=$0 }
NR == 2 { l2=$0 }
NR == 3 {...
3,169
Posted By pseudocoder
Maybe awk '/^alter table/ {print $3}' file >...
Maybe
awk '/^alter table/ {print $3}' file > table.names
:confused:
1,287
Posted By pseudocoder
while read line; do echo "$line" | grep "^$"...
while read line; do
echo "$line" | grep "^$" >/dev/null 2>&1 && (echo; echo) || echo -n $line
done <file ; echo
<span class="time"><strong>06:00</strong></span>

<div class="cDesc"...
2,705
Posted By pseudocoder
find . -type f -name "*.doc" | while read fn; do ...
find . -type f -name "*.doc" | while read fn; do
mv -v "$fn" "$(echo $fn | sed 's/\.doc$/\.txt/')"
done
1,734
Posted By pseudocoder
perl -ne '{push @x, $_}END{pop(@x); print @x}'...
perl -ne '{push @x, $_}END{pop(@x); print @x}' file1
1,918
Posted By pseudocoder
while read pattern; do grep "^$pattern [0-9]"...
while read pattern; do
grep "^$pattern [0-9]" file1
done <file2
2,391
Posted By pseudocoder
egrep '>|^[A-Z][A-Z][A-Z]$' infile
egrep '>|^[A-Z][A-Z][A-Z]$' infile
7,358
Posted By pseudocoder
Hope you mean this type of splitting... ...
Hope you mean this type of splitting...
#!/usr/local/bin/perl

use strict;
use warnings;

my $infile='file.txt';
my $count=1;
my $outfile="$infile-section_$count.txt";
my @arr;

sub...
1,464
Posted By pseudocoder
If the identifier won't get longer than 32 chars...
If the identifier won't get longer than 32 chars you could try this:
cut -c1-32 file
Forum: HP-UX 06-19-2010
3,330
Posted By pseudocoder
Try fstyp(1M)...
Try fstyp(1M) (http://docs.hp.com/en/B3921-90010/fstyp.1M.html)
6,386
Posted By pseudocoder
Did you get any error message? Can you please...
Did you get any error message?
Can you please double check that you have correctly copy/pasted my latest posting (incl. some changes that I had to do right after I've posted that).
9,361
Posted By pseudocoder
Maybe this? $ perl -nle 'if ($a == 0) { push...
Maybe this?
$ perl -nle 'if ($a == 0) { push @x, $_; $a=1; next; }
if ($a == 1 && length($_) >=11 && length($_) <= 17)
{ print @x; print $_; $a=0; @x=(); }
...
5,432
Posted By pseudocoder
Also in Perl '>>' is used for appending stuff to...
Also in Perl '>>' is used for appending stuff to a file:
#!/usr/local/bin/perl

use strict;
use warnings;

my $line1='ABCDEFGH';
my $line2='09876543';

open(OUT,">>mydata.dat") or die...
Forum: Programming 06-13-2010
1,191
Posted By pseudocoder
Another way, which is pretty similar to Tytalus'...
Another way, which is pretty similar to Tytalus' approach:
$ echo '0,1,0,87,0,0,"6,87","170,03",0,"43,5",0,0,0,0,"6,87","126,53"' |\
> sed 's/"\([0-9]*\),\([0-9]*\)"/\1.\2/g;s/,/ /g;s/\./,/g'
0 1...
2,062
Posted By pseudocoder
Yeah, because I (apart from the Perl script) only...
Yeah, because I (apart from the Perl script) only helped you to solve this problem:
# but I want to check if file is .java or .c++ not a simple file (-f), I don't know how to do it..

The part...
3,732
Posted By pseudocoder
$ echo 'abc,xyz.com,lmhgdf,"abc, 401...
$ echo 'abc,xyz.com,lmhgdf,"abc, 401 street","tty,stt",45,23,45' | \
sed 's/"[^"]*"//g' | grep -o , | wc -l
7
$
2,004
Posted By pseudocoder
Try sed -e "s/\(.*TRANSFER TO\).*\(\/usr\)/\1...
Try
sed -e "s/\(.*TRANSFER TO\).*\(\/usr\)/\1 $var \2/"

To "translate" $var into it's value
To also pick the slash "/" from usr
5,835
Posted By pseudocoder
fold -w1 file | perl -nle 'push @x, $_; print @x'
fold -w1 file | perl -nle 'push @x, $_; print @x'
Showing results 1 to 25 of 79

 

Featured Tech Videos

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