Unix/Linux Go Back    

Showing results 1 to 25 of 500
Search took 0.07 seconds.
Search: Posts Made By: michaelrozar17
Forum: Shell Programming and Scripting Linux 09-21-2016
Replies: 2
Views: 705
Posted By michaelrozar17
Thanks Corona688 for the information.

Thanks Corona688 for the information.
Forum: Shell Programming and Scripting Linux 09-21-2016
Replies: 2
Views: 705
Posted By michaelrozar17
MemFree from /proc/meminfo

From the following /proc/meminfo output only ~2GB is free out of total 250GB, but Cached is 194630300 kB. My customer is concerned over the very little memory showing as free. Kindly shed some light...
Forum: Shell Programming and Scripting Linux 03-01-2014
Replies: 10
Views: 2,008
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";
Forum: Shell Programming and Scripting Linux 02-27-2014
Replies: 5
Views: 1,390
Posted By michaelrozar17
Try.. $ sed -n 'H > ${ > x > s/\(&LOG...

Try..
$ sed -n 'H
> ${
> x
> s/\(&LOG Part: \"@DB\/TC.\{11\}\/...\"\n&LOG\) *\(\n\)/\1 Cloning_Action: RETAIN \2/g
> p
> }' infile

&LOG
&LOG Part: "@DB/TC10000021855/--F"
Forum: Shell Programming and Scripting Linux 01-07-2014
Replies: 4
Views: 588
Posted By michaelrozar17
If your version of SED supports -i option then...

If your version of SED supports -i option then you could use it instead of mv command
sed -i "....
Forum: Shell Programming and Scripting Linux 01-07-2014
Replies: 4
Views: 588
Posted By michaelrozar17
The grep and sed you have in the script does not...

The grep and sed you have in the script does not modify the file you wanted to or its not the correct way to do it. Try as
michaelf>cat fil.ksh
#!/bin/ksh

echo "Enter Old domain name:"
read old...
Forum: Shell Programming and Scripting Linux 01-07-2014
Replies: 2
Views: 422
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...
Forum: Shell Programming and Scripting Linux 01-07-2014
Replies: 6
Views: 1,074
Posted By michaelrozar17
One of the way would be to source the file. Try ...

One of the way would be to source the file. Try
michaelf>cat fil.ksh
#!/bin/ksh

#function
find_cfg()
{
awk "/$1/ {for(i=1; i<=4; i++) {getline; print}}" FILE.cfg>/home/michael/outfil
}
Forum: Shell Programming and Scripting Linux 01-07-2014
Replies: 5
Views: 513
Posted By michaelrozar17
With Sed michaelf>uname SunOS michaelf>sed...

With Sed
michaelf>uname
SunOS
michaelf>sed -n 'H
> /Jak/{
> g
> s/.*\n\(.*\n.*\)/\1/
> N
> p
> }' infile
Forum: Shell Programming and Scripting Linux 01-02-2014
Replies: 2
Views: 1,007
Posted By michaelrozar17
You can make use of REPLACE function to convert...

You can make use of REPLACE function to convert _TE to _TH in the SQL query itself.
select 'create synonym "'||TABLE_NAME||'" for '||replace(Table_owner,'_TE','_TH')||'."'||table_name||'"'||chr(59)...
Forum: Shell Programming and Scripting Linux 01-02-2014
Replies: 4
Views: 823
Posted By michaelrozar17
There is a typo and a small correction to your...

There is a typo and a small correction to your code, try as:
ls -1 *.txt|sed 's/\(MISTradesReport_[0-9]*_d130240_\)\(V.*\)/mv \1\2 \2/'
Forum: Shell Programming and Scripting Linux 12-26-2013
Replies: 17
Views: 1,711
Posted By michaelrozar17
Oops! I'm sorry. I must have replied without...

Oops! I'm sorry. I must have replied without thinking twice.
Forum: Shell Programming and Scripting Linux 12-26-2013
Replies: 17
Views: 1,711
Posted By michaelrozar17
Or try removing the g from the sed statement ...

Or try removing the g from the sed statement
sed s!${LINE}!leprechaun.host.uri.list=raft://${RAFTIP}:${RAFTPORT}! HostSocket.txt > tmp.properties
Forum: Shell Programming and Scripting Linux 09-23-2013
Replies: 3
Views: 730
Posted By michaelrozar17
Your logic is correct but change the syntax as if...

Your logic is correct but change the syntax as if [ $? -eq 0 ]. We use == for string comparison.
Forum: UNIX for Dummies Questions & Answers Linux 07-04-2013
Replies: 7
Views: 1,754
Posted By michaelrozar17
With Sed. sed 's/.*pid{\([^}]*\).*/\1/' infile

With Sed.
sed 's/.*pid{\([^}]*\).*/\1/' infile
Forum: Shell Programming and Scripting Linux 04-12-2013
Replies: 5
Views: 1,569
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_-"
$
Forum: Shell Programming and Scripting Linux 04-11-2013
Replies: 3
Views: 967
Posted By michaelrozar17
RedHat Alternatively.. $ uname Linux $ cat fil1 ...

Alternatively..
$ uname
Linux
$ cat fil1
2860377|"DATA1"|"DATA2"|"65343"|"DATA2"|"DATA4"|"11"|"DATA5"|"DATA6"|"65343"|"DATA7"|"0"|"8"|"1"|"NEGATIVE"...
Forum: Shell Programming and Scripting Linux 04-09-2013
Replies: 3
Views: 807
Posted By michaelrozar17
Yes, my mistake. sed...

Yes, my mistake.
sed 's/\([^,]*,\)\([^,]*,\)\([^,]*,\)/\1\3\2/' inputfile
Forum: Shell Programming and Scripting Linux 04-09-2013
Replies: 3
Views: 807
Posted By michaelrozar17
Similarly.. ...

Similarly..
s/\([^,]*\,)\([^,]*\,)\([^,]*\,)/\1\3\2/ inputfile
Forum: Shell Programming and Scripting Linux 04-09-2013
Replies: 2
Views: 17,015
Posted By michaelrozar17
Just $1+$2 will not do the arithmetic operation...

Just $1+$2 will not do the arithmetic operation in UNIX. You need to have as highlighted below and i believe you include the call to the function at the end of the function calc as
#!/usr/bin/ksh ...
Forum: Shell Programming and Scripting Linux 04-08-2013
Replies: 7
Views: 1,646
Posted By michaelrozar17
By awk: awk '/Enabled/{++s[$2]} END {for(f in...

By awk:
awk '/Enabled/{++s[$2]} END {for(f in s) print f,s[f]}' lspath.txt
Forum: Linux Linux 12-17-2012
Replies: 10
Views: 1,474
Posted By michaelrozar17
I believe it would not. Could you test it? My...

I believe it would not. Could you test it? My machine does not support -i option.
Forum: Linux Linux 12-17-2012
Replies: 10
Views: 1,474
Posted By michaelrozar17
You can use sed's q option to quit reading...

You can use sed's q option to quit reading further lines. So try
$ sed -ie '/^#/!{
> s/:.*/:Changed_Pattern/
> q
> }' inputfile
Forum: Shell Programming and Scripting Linux 12-17-2012
Replies: 10
Views: 3,908
Posted By michaelrozar17
With Sed.. sed -e 's/^\([^,]*,\)\(,\)/\1NA\2/'...

With Sed..
sed -e 's/^\([^,]*,\)\(,\)/\1NA\2/' -e 's/\([^,]*,[^,]*,\)\(,\)/\1NA\2/' inputfileOr a little shorter version..
sed -e 's/^\([^,]*,\),/\1NA,/' -e 's/\([^,]*,[^,]*,\),/\1NA,/' inputfile
Forum: Shell Programming and Scripting Linux 12-15-2012
Replies: 6
Views: 861
Posted By michaelrozar17
'/PIN (new)/r file_lines_to_insert' => When this...

'/PIN (new)/r file_lines_to_insert' => When this pattern matches lines from file_lines_to_insert in inserted.

'x' => This command helps to switch the content of pattern buffer with hold buffer....
Showing results 1 to 25 of 500

 


All times are GMT -4. The time now is 03:37 AM.