Search Results

Search: Posts Made By: bartus11
18,130
Posted By bartus11
awk -F, 'NR==1{print "file_name",$0;next}{print...
awk -F, 'NR==1{print "file_name",$0;next}{print FILENAME , $0}' infile
2,353
Posted By bartus11
You have to escape the double quotes that you...
You have to escape the double quotes that you want to preserve in echo output, like this:echo "user_pref(\"network.proxy.http\", \"$j\");"
10,129
Posted By bartus11
I know its Perl, and it looks ugly, but if you...
I know its Perl, and it looks ugly, but if you don't mind that then here it goes:perl -pe 's/(.{105}).(.{50}).(.{79}).(.*)/\1xxx\2xxx\3xxx\4/' file > out.file I hope I didn't mess numbering ;)
1,791
Posted By bartus11
You dont need cat here. Also, use double quotes: ...
You dont need cat here. Also, use double quotes:
Search_String=100
Replace_String=151
sed "s|${Search_String}|${Replace_String}|g" ${work}/temp_${CSV_File} > $work/${work_1}/${CSV_File}
Forum: Solaris 02-08-2015
3,333
Posted By bartus11
Take a look at newtask. ...
Take a look at newtask.
(http://docs.oracle.com/cd/E26502_01/html/E29030/newtask-1.html)
Forum: Solaris 02-01-2015
12,077
Posted By bartus11
If adding more disks is possible, then you could...
If adding more disks is possible, then you could create mirrored vdevs, by attaching mirror disks to c3t5000CCA012B3E751d0 and c3t5000CCA012B39541d0. See manual for zpool attach command.
1,775
Posted By bartus11
Try:echo "Enter INPUT:" read INPUT echo...
Try:echo "Enter INPUT:"
read INPUT
echo "Enter OUTPUT:"
read OUTPUT
cut -f1-4 $INPUT | sed 's/hello/goodbye/g' | sort -uV > $OUTPUT
2,109
Posted By bartus11
Take a look here: perlform - perldoc.perl.org...
Take a look here:
perlform - perldoc.perl.org (http://perldoc.perl.org/perlform.html)
4,412
Posted By bartus11
You can also do something like this: ...
You can also do something like this:
#!/usr/bin/perl

use strict;
use warnings;
use diagnostics;

qx'sed -i "s/Hi Mom!\|Hi Dad!/Bye Everyone!/I" ./test.txt';

No more double backslash, but...
4,412
Posted By bartus11
Try:#!/usr/bin/perl use strict; use...
Try:#!/usr/bin/perl

use strict;
use warnings;
use diagnostics;

`sed -i 's/Hi Mom!\\|Hi Dad!/Bye Everyone!/I' ./test.txt`;
1,948
Posted By bartus11
Try:#!/bin/bash func_1(){ echo $1 } ...
Try:#!/bin/bash
func_1(){
echo $1
}

func_1 $1
2,445
Posted By bartus11
Try:$ORACLE_HOME/OPatch/opatch lsinventory...
Try:$ORACLE_HOME/OPatch/opatch lsinventory -bugs_fixed | perl -p0e '$spaces=" " x 52;s/\n$spaces(\w)/ $1/g'
2,958
Posted By bartus11
Try:awk '{a[$1" "$2]+=$3}END{for (i in a) print...
Try:awk '{a[$1" "$2]+=$3}END{for (i in a) print i,a[i]}' file | sort
2,546
Posted By bartus11
Try:awk 'NR==FNR{a[$1]=$0}NR!=FNR{for...
Try:awk 'NR==FNR{a[$1]=$0}NR!=FNR{for (i=2;i<=NF;i++) a[$1]=a[$1]" "$i}END{for (i in a) print a[i]}' File01 File02 File03 | sed 's/\([^ ]\) /\1, /g' | sort
2,585
Posted By bartus11
Change:mkMapEntry () { test -f $6 || { echo...
Change:mkMapEntry () {
test -f $6 || { echo "The file $6 does not exist. Skipping $1." 1>&2; return -1; }
echo "CosyMap $1;"
echo "$1.setA($2);"
echo "$1.setQ($3);"
echo...
14,788
Posted By bartus11
Try:awk -F"\t" '$1==$2&&$1=="ndc"{print NR":...
Try:awk -F"\t" '$1==$2&&$1=="ndc"{print NR": "$0}' inputfile
2,656
Posted By bartus11
Try:perl -pe...
Try:perl -pe 's/(([^.]+\.){2}[^.]+).*?(\s+.*)/$1$3/' input.txt
3,184
Posted By bartus11
I'd say this is some kind of bioinformatics data....
I'd say this is some kind of bioinformatics data. Anyway, you can try this in a directory containing your files:
perl -lne '$,="...
1,015
Posted By bartus11
Try:find $SRC -type f -name *.emlx | while...
Try:find $SRC -type f -name *.emlx |
while read FILE
do
awk '/^From:/ && gsub(/.*<|>.*/,x)' $FILE
done | sort | uniq > ~/Desktop/output.txt
echo "complete"
931
Posted By bartus11
Try:for i in /path/*.rnk; do java -jar commands...
Try:for i in /path/*.rnk; do java -jar commands -res $i -out ${i%.*} -gui false; done
3,045
Posted By bartus11
Try:perl -n0e 'while...
Try:perl -n0e 'while (/TD.*?(?=TD|$)/sg){$x=$&;$x=~/TD:\s*(\w+)/;open $f,">>","$1";print $f $x; close $f}' file
2,351
Posted By bartus11
Try:awk -F"," '/^import/{print $1;for...
Try:awk -F"," '/^import/{print $1;for (i=2;i<=NF;i++) print "import"$i;next}1' input.py
1,557
Posted By bartus11
Try:awk 'NR==FNR{a[$0]=1;next}a[FNR]==1{gsub...
Try:awk 'NR==FNR{a[$0]=1;next}a[FNR]==1{gsub ("H","Na+")}1' test testsds.pdb
4,548
Posted By bartus11
Does it have to be AWK? Try this if not:perl...
Does it have to be AWK? Try this if not:perl -ln0e 'while (/(interface[^\n]+).*?(?=interface|$)/sg){$x=$&;$y=$1;print $y if $x!~/filter-shared 14/ && $y=~/move-group/}' file
2,365
Posted By bartus11
Try:awk '{for (i=1;i<=NF;i++) $i=sprintf...
Try:awk '{for (i=1;i<=NF;i++) $i=sprintf ("%.2f",$i)}1' file
Showing results 1 to 25 of 500

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