Search Results

Search: Posts Made By: michaelrozar17
2,183
Posted By michaelrozar17
Thanks Corona688 for the information.
Thanks Corona688 for the information.
3,274
Posted By michaelrozar17
I didn't understand completely, can you try...
I didn't understand completely, can you try replacing those ? with . (period) if echo "$z" | grep -q "R1......R1";
1,042
Posted By michaelrozar17
Something like this..? michaelf>uname SunOS ...
Something like this..?
michaelf>uname
SunOS
michaelf>nawk -F'[: ]' '/Parameter Name/{f=$5;getline;print f"-->"$5}' infile
SNAPSHOTTIMESTAMP-->2014-01-07-15.21.50.022423
DATABASESIZE-->96178176...
2,865
Posted By michaelrozar17
Alternate Sed.. $ sed 's/\([^ ]*\) \([^ ]*\)...
Alternate Sed..
$ sed 's/\([^ ]*\) \([^ ]*\) \(.*\).$/\1 \2 \3_\1_\2"/' inputFile
chr1 + "NM_1234_chr1_+"
chr1 - "NM_1234_chr1_-"
$
1,341
Posted By michaelrozar17
If you want to reproduce sed's + character to *...
If you want to reproduce sed's + character to * then try as below
sed 's/@[a-z0-9A-Z][a-z0-9A-Z]*\.[a-zA-Z0-9][a-zA-Z0-9]*/REPLACE/g'
3,846
Posted By michaelrozar17
Through Sed.. sed 's/^/000/' inputfile
Through Sed..
sed 's/^/000/' inputfile
6,280
Posted By michaelrozar17
Try the below as is.. $ uname -rs SunOS 5.10 ...
Try the below as is..
$ uname -rs
SunOS 5.10
$ sed 's/^ *//
> /PRODUCT CODE/{
> :l
> N
> /<.PRODUCT>/{
> s/ *\n *//gp
> d
> }
> bl
> }' inputfile
6,280
Posted By michaelrozar17
I do get the expected output as mentioned in post...
I do get the expected output as mentioned in post #1 with the same input file pattern. Can you attach the large file that does not work for these solutions..?
$ sed 's/^ *//
> /PRODUCT CODE/{
> :l...
1,009
Posted By michaelrozar17
Replace with the below sed in the loop and try.. ...
Replace with the below sed in the loop and try..
sed 's/k/'$i'/g' inputfile
2,713
Posted By michaelrozar17
Alternate awk.. $ uname -rs SunOS 5.10 $...
Alternate awk..
$ uname -rs
SunOS 5.10
$ nawk '$6!="9999"{gsub(/[)(\]\[]/,"",$0);print}' inputfile
3,058
Posted By michaelrozar17
It does not require any change to run in a shell...
It does not require any change to run in a shell script, just copy paste the sed or awk lines into a file and run. But remember to give full path name of the inputfile, its better coding.
$ cat...
1,522
Posted By michaelrozar17
I neither worked in Postgres or installed it in...
I neither worked in Postgres or installed it in my pc to test hence i would not able to help you much, but try searching in internet for postgres sql tuning tips etc. As suggested earlier try...
4,471
Posted By michaelrozar17
Through Sed.. sed -n...
Through Sed..
sed -n 'H;/^$/{x;/COMMAND.*SEARCHPATTERN/s/.*\(REQUESTSTRING[^;]*\);.*/\1/p}' inputfile
1,488
Posted By michaelrozar17
Or try.. awk '{a[$0]++;next}END{for(i in...
Or try..
awk '{a[$0]++;next}END{for(i in a)print i,a[i]}' filename
1,180
Posted By michaelrozar17
Through Sed sed 's/\([^,]*,[^,]*,\)\([^ ]*\)...
Through Sed
sed 's/\([^,]*,[^,]*,\)\([^ ]*\) \([^,]*\),\([^ ]*\) \([^,]*\)/\1\3 \2,\5 \4/' inputfile
3,299
Posted By michaelrozar17
To the test file you have posted above, try...
To the test file you have posted above, try something like..
sed '/ARS (11)/!s/.*/SOME TEXT HERE\n&/' test_file
Note: This would not work for all scenarios until there is a exact sample input/test...
1,798
Posted By michaelrozar17
Command cut would do the same job echo $str |...
Command cut would do the same job
echo $str | cut -d'|' -f1 # try -f2 or -f3
4,486
Posted By michaelrozar17
I guess this kind of output is something related...
I guess this kind of output is something related to OS. What OS your in..? Try mailx's -a option to send attachment if available
4,860
Posted By michaelrozar17
What OS your using..? Maybe you can try as...
What OS your using..? Maybe you can try as Len=`/usr/local/bin/expr "$BASENAME" : '.*'` instead of length expression.
1,794
Posted By michaelrozar17
Here you go.. [mkt@michael]$ sed '/^<li>/{ >...
Here you go..
[mkt@michael]$ sed '/^<li>/{
> />$/!s/$/<\/li>/
> }' inputfile
...
<li>keyword</li>
<li>keyword</li>
<li>keyword</li>
<li>keyword</li>
<li>keyword</li>
...
[mkt@michael]$...
9,881
Posted By michaelrozar17
Remove the s in sed command and try, s is for...
Remove the s in sed command and try, s is for substitute but here you only delete.
sed '/^\.abc/d' inputfile

# General solution..
sed '/^\./d' inputfile
5,163
Posted By michaelrozar17
You would need to remove the control character \r...
You would need to remove the control character \r present near $1 either by running
$ tr -d '\r' < mc.sh > mc_new.sh
$ ./mc_new.sh
# or if you have the dos2unix utility then
$ dos2unix mc.sh >...
1,396
Posted By michaelrozar17
You can try -r alpha@domain.com along with the...
You can try -r alpha@domain.com along with the mail command. But check in your man page as different OS would have their own meanings.
11,799
Posted By michaelrozar17
Or this..? sed -n '/text/s/<[^<]*>//gp'...
Or this..?
sed -n '/text/s/<[^<]*>//gp' inputfile
sed -n '/text.*1st/s/<[^<]*>//gp' inputfile
2,957
Posted By michaelrozar17
Ok.Since you do not pass any input to awk...
Ok.Since you do not pass any input to awk statement you just get the output as File Owner. Try as suggested by itkamaraj or ls -l | ./awk_example1.sh
Showing results 1 to 25 of 172

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