Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: michaelrozar17
1,405
Posted By michaelrozar17
Thanks Corona688 for the information.
Thanks Corona688 for the information.
2,521
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";
565
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,217
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_-"
$
962
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'
562
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
5,123
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,653
Posted By michaelrozar17
Alternate awk.. $ uname -rs SunOS 5.10 $...
Alternate awk..
$ uname -rs
SunOS 5.10
$ nawk '$6!="9999"{gsub(/[)(\]\[]/,"",$0);print}' inputfile
5,123
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
1,797
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...
3,838
Posted By michaelrozar17
Through Sed.. sed -n...
Through Sed..
sed -n 'H;/^$/{x;/COMMAND.*SEARCHPATTERN/s/.*\(REQUESTSTRING[^;]*\);.*/\1/p}' inputfile
3,302
Posted By michaelrozar17
Through Sed.. sed 's/^/000/' inputfile
Through Sed..
sed 's/^/000/' inputfile
1,107
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...
1,041
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
877
Posted By michaelrozar17
Through Sed sed 's/\([^,]*,[^,]*,\)\([^ ]*\)...
Through Sed
sed 's/\([^,]*,[^,]*,\)\([^ ]*\) \([^,]*\),\([^ ]*\) \([^,]*\)/\1\3 \2,\5 \4/' inputfile
2,469
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,301
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
3,779
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
3,271
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,246
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]$...
5,925
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
4,438
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 >...
781
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.
2,009
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
2,009
Posted By michaelrozar17
How do you run the above awk script..? Try like...
How do you run the above awk script..? Try like sh awk_example1.sh where
[mkt @michael]$ cat awk_example1.sh
#!/bin/sh
# Linux users have to change $8 to $9
awk '
BEGIN { print "File\tOwner" }...
Showing results 1 to 25 of 172

 

Featured Tech Videos

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