OS X :: Shell Script Won't Work

Mar 29, 2009

I have a small script that doesnt work well enough. Here is the code.

#!/bin/bash
echo $1
app=$1
procname=`ps -ef | grep -i $app | grep -v grep`
echo $procname
output
-------
./example firefox
firefox
501 247 134 0 16:13.29 ?? 67:29.49 /Applications/Firefox.app/Contents/MacOS/firefox-bin -psn_0_131104 501 4079 2386 0 0:00.00 ttys000 0:00.01 /bin/bash ./example firefox 501 4080 4079 0 0:00.00 ttys000 0:00.00 /bin/bash ./example firefox

But when I execute the the following code on the bash shell the output is different.

app=firefox
procname=`ps -ef | grep -i $app | grep -v grep`
echo $procname
output
-------
501 247 134 0 16:41.88 ?? 68:48.90 /Applications/Firefox.app/Contents/MacOS/firefox-bin -psn_0_131104

The outputs are different so what could be the problem?

View 3 Replies


ADVERTISEMENT

OS X :: Shell Script - MV Command

Mar 5, 2010

I'll be the first to admit it, I'm bad with scripts, but I'm trying to figure this script out and have hit a dead end. There is a large list of MV commands to move a specific file into a folder, but the script isn't working when ran all together. But strangely, it will work when i enter it line by line into terminal. Anyone know what I'm doing wrong?

mkdir design02a
mkdir design05a
mkdir design06a
mkdir design09a
mkdir design09b
mkdir design12a.....

View 18 Replies View Related

OS X :: Full Pathname To Run Shell Script?

Oct 3, 2010

I'm trying to create a shell script or compile it into an application using automator that runs a JAR file. Everything works great except that I have to specify the full pathname in the shell script. I thought that ./ or .../ or something similar would denote that I want to run the .JAR file that is in the containing folder but I'm not having any luck.

View 7 Replies View Related

PowerPC :: G4 IBook Shell Replacement

Nov 13, 2007

I have a chip on the side of my g4 ibook and would like to change the whole case to something other than the standard glossy white. I recall there was a company that made really colorful (red, blue, pink) Macs, but can't find anything online. Well, I found one company [URL] but they sell the machine not just a case. Anyway, I think they were painted, but by now I figure there has to be a company offering a way to customize Macs. does anyone know of one?

View 4 Replies View Related

OS X :: Run Two Things Simultaneously Via One Shell Script?

Apr 17, 2009

Can you run two things simotaniously via one shell script?

View 1 Replies View Related

MacBook Pro :: How To Get Sleeve / Shell / Protection For MBP?

May 28, 2009

how to get sleeve / shell / protection for MBP?

View 24 Replies View Related

Mac Pro :: Want To Upgrade Shell / RAM And Video Card

Oct 11, 2009

I've got a mac pro with it's shell/casing seriously dented. I dropped it. Thankfully, the insides are working just fine. Since I can't sell this thing, I decided to upgrade it instead. It's got 3.0ghz xeon processor, quad-core. It's used for gaming. I've got 7300 GT Nvidia vid cards in there (3 of them). I don't even know what it's used for. ROFL. 2GB RAM.So what I need to know is the following:

1.Other than the dreadfully heavy heavy Mac pro's standard casing, is there another case I can replace it with? What would be compatible?
2.I want to upgrade my RAM to the max. Is it 32GB or 64GB? What is the cheapest type of RAM I can purchase without losing much performance?
3.What is the latest video card I can use with my quad-core? which is compatible?
4. Is quad-core 3.0ghz xeon, a good computer you think? or shall I just forget the upgrade and spend the money to buy a 16 core or something, while I just need the pc for gaming?

The serial # appears to be: G8635343UPZ
MODEL NO: A1186

View 16 Replies View Related

MacBook Pro :: What Should I Use To Clean The Screen And Shell?

Nov 19, 2009

I have the older macbook pro before the reflective glass and aluminum shell.

There is already a light scratch on the screen from my dumness.

View 1 Replies View Related

MacBook Pro :: MBP Battery Broke Out Of Its Shell

May 18, 2010

A couple years ago, there was a recall on MacBook Pro (C2D) batteries as a result of them expanding and bulging. As I experienced those symptoms, I called Apple and got a replacement shipped no problem. Fast forward to a year and a half or-so later, and the same thing has happened to this battery. I was wondering if anyone had any insight as to if I'd still be eligible to get a replacement for it, free of charge - since I don't have a warranty. Is the recall still valid? Any insight on this would be greatly appreciated - worse comes to worse, I'll have to buy an aftermarket battery, since I can't afford Apples at the moment.

View 15 Replies View Related

IMac :: Empty Shell And LCD Screen

Jun 2, 2010

I have a empty mac shell missing motherboard, has the screen and the connector for the screen I wanna no if there is a way, I can use the screen on a normal desktop i.e. VGA or DVI?

View 1 Replies View Related

MacBook Pro :: Using It In Clam-shell Mode?

May 8, 2012

After I installed OS X Lion 10.7.3 on my MacBook Pro and tried to use it in clamshell mode my computer appears to build up heat and the fans started running.

Info:
MacBook Pro, Mac OS X (10.7.3)

View 3 Replies View Related

Intel Mac :: Way To Remove Outer Shell

May 17, 2012

Way to remove outer shell

Info:external drive, iOS 4.1

View 2 Replies View Related

OS X :: Shell Script To Invoke Screen Capture

Sep 27, 2010

Basically I need a one click solution to the screen capture program built into OS X. I want something that I can pin to the dock and when I click it it performs the command+shift+3 that copies the whole screen and saves a png to the desktop. I have found some commands to call up key codes for the letter keys but I need to know how to call up the other keys. Would it be easier to just make a script in the script editor. I'm not a mac / unix guy and I realize that this is really simple I'm just new at it.

View 4 Replies View Related

OS X :: Deleted Private Folder - Shell Not Specified With Legal Value

May 27, 2009

I deleted the "hidden" private folder on my mac, but that still on trash. Now the big problems are:

- when I try to open Terminal to move the folder from the trash to my hard disk, appears a message that says: the administrator doesn't specified your shell with a legal value.
- I can't change the date and time;
- well almost nothing.

View 4 Replies View Related

MacBook Pro :: Alternatives To Speck Hard Shell

Aug 8, 2009

I got a Speck hard shell for my 17'' unibody and I love it in all respects (beautiful, MBP doesn't run hoter, rubberized, tough) except for its weight (over 1 lb). It tips the weight of the MBP from very bearable into too heavy. Any alternatives? I'm not looking for protection from dings but just small scratches.

View 8 Replies View Related

OS X :: Screensaver Not Working In Clam Shell Mode?

Jan 27, 2010

When I leave my clam shelled computer alone for a while, it doesn't start the screen saver after 5 minutes like I set it to. Is this intentional on Apple's part? If so, is there a program I could download to make it work?

View 1 Replies View Related

MacBook Pro :: Black (Scratch) Mark On Shell

Apr 18, 2010

I am sure this has probably been asked a million times but is there anyway to touch up a black mark thats on my macbookpro. It doesn't look like a scratch, more the aluminum finish has rubbed off or been scratched slightly.

View 1 Replies View Related

MacBook Pro :: Shell Case That Can Fit In New Power Cable

Jun 6, 2010

I just purchased a new 15inch Macbook Pro. Upon opening it, the first thing I did was drop my alarm clock on it. This put a little dent on the top front behind the screen. This made me realize that maybe I should pick up a hardshell case to prevent anymore dents. But, upon investigation, there are no hardshell cases that fit the magsafe cable.Or is this not true? Are there brands besides Speck and incase that would fit the new MBP?

View 11 Replies View Related

MacBook Pro :: What Is The Trick To Use The Clam Shell Mode?

Jun 12, 2010

I can get it to work sometimes. When you close the lid it goes to sleep. What do you do to get it to work using the external monitor?

View 8 Replies View Related

Software :: Run Shell Script Before Shutdown With Launchd?

Nov 17, 2008

Is there a way to run a shell script before shutdown with launchd? In 10.4, I have a shell script to remove user's folder when a user logs off. how to do a rc.shutdown in 10.5

View 1 Replies View Related

Software :: Fan Speed Stuck Via Run Script Shell

Jun 28, 2010

I was playing with terminal and run a script shell: /Applications/smcFanControl.app/Contents/Resources/smc -k F0Mx -w 2e80 in shell bin/bash and now my fan is going back to the 3000 rpm speed even though I change in smcfancontrol to 5000 or whatever speed. Could you help me clear the command so the fan will run normal again?

View 2 Replies View Related

OS X Technologies :: Shell Script For Collecting Information On Mac

Mar 1, 2012

Any sample script to collect the information from Mac OS such network, hostname, Mac OS version.. so on?

Info:
MacBook Pro, Mac OS X (10.7.2)

View 2 Replies View Related

OS X Technologies :: Folder Action To Run A Shell Script

Aug 7, 2012

I want to create a Folder Action to run the following shell script on all files with extension .vcs: 

sed '1d' >reminder.ics 

The job of the Folder Action is to take any Calendar item files downloaded from TVGuide.co.uk, remove the first line and then save them as .ics files.  The reason for this is that the files are automatically generated with a carriage return on the first line, which BusyCal (being strict about these things) doesn't like.  It then rejects the whole file. 

I have tried doing this with Automator but the result didn't work. 

If it's possible to have the Folder Action retain the original file name (ie. everything pre-extension) that'd be a bonus. 

Info:
Mac mini (Mid 2011), Mac OS X (10.7.4)

View 4 Replies View Related

Applications :: Launching Shell Script From Command Line

Sep 18, 2010

I have an shell script that I launch from the command line. Is there an easy way to run this script using its own Icon in the applications folder.

View 3 Replies View Related

MacBook Pro :: Rubberized Soft Shell Covers For 15"

Sep 23, 2007

I saw a article/rumor about some company that is making a rubberized soft shell covers for our MBP. I having a hard time finding this and I keep running into those Speck hard cases...

View 4 Replies View Related

MacBook :: Speck Pink Hard Shell Case

Sep 27, 2009

Anyone know any sold sources for where to get a pink Speck Hard shell case? I've found a few websites that claim to have thembut they mostly ship from China and they give no timeframe when the item will arrive. I've checked eBay and craigslist. I found on on eBay, and I purchased it. And about a week later the seller refunded my payment with no explanation or reason and he won't return my emails. So again, if anyone knows a solid source for where to get a Speck, and Speck only

View 6 Replies View Related

MacBook Pro :: Its Not Waking Up From Closed Clam-shell Sleep?

Feb 2, 2012

I've been having problems with my mid 2009 2.53GHz MacBook Pro 15" not waking up from sleep after I open the clamshell (screen) back up.  When I open the screen after letting it sit for a while, I can hear the HDD spinning up and the status light on the bottom of the MacBook turns off (like it normally does when the clamshell is opened), but the screen is black and there is absolutely no response in any key combinations or trackpad taps.  I've been having this problem for about a month now and its getting pretty annoying.  I've tried a total wipe of the disk and a fresh Lion install with a full TimeMachine restore, but I'm having absolutely no luck.  The only thing that can bring the MBP back to life is a hard restart.  Sometimes when I hard restart it, it comes back to life right where I let off (basically like when the battery loses all its juice and restores everything thats open), but most of the time, it starts up like a normal boot with no restore. 

Info:
MacBook Pro, Mac OS X (10.7.2), MacBook Pro 15" 2.53GHz 4GB RAM

View 3 Replies View Related

Shell Of Macbook Pro Starts To Be Convex And Uneven After 3weeks

Apr 1, 2012

Moreover I found that the display is definitely NOT new. Hate to buy from apple store. Better switch to Amazon folks. Amazon offers a better costumer serivce.

Info:
Mac OS X (10.7.3)

View 1 Replies View Related

OS X V10.7 Lion :: Cannot Get Macbook Pro To Stay In Clam-shell Mode

Apr 16, 2012

cannot get my macbook pro to stay in clamshell mode.I use MBP connected to a spectra view monitor, display fine until I touch the keypad then switches into mirroring mode.

Info:
MacBook Pro, Mac OS X (10.7.3)

View 1 Replies View Related

MacBook Air :: Skin, Wrap, Sleeve, Case, Shell...how To Protect

Dec 6, 2010

Not sure how to best protect my MBA 11.

Perhaps more than one of the above?

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved