OS X Technologies :: Shell Script For Collecting Information On Mac
Mar 1, 2012Any 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)
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)
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)
I'm making an applescript app for my company, and had a question.The functionality of the app is working great, but there is a certain step which can take up to several minutes.This can give the user the feeling that nothing is happening and things are stuck. Is there a possibility to display a dialog as long as the action (shell script) is running?Something along the lines of "Now performing action X.
Info:
MacBook Pro, Mac OS X (10.7.3)
I want to erase a bunch of ancient floppy disks before dumping them and the drive, and I'd like to script an automated solution that will ensure that the media I'm erasing is in my floppy drive, and I'm not blasting one of my Hard Drives by mistake. I'm hoping that my script will be able to trace from the drive to the floppy to ensure that I've got the right target, else quit before doing any damage. The names of the floppy disks themselves are varied, but the name of the drive itself is stable and known. Disk Utility shows the name of the drive (Y-E DATA USB-FDU Media) and the name of the particular disk volume in the drive at the moment. I can find the floppies in the /dev/disk# special file, but I haven't found the drive itself.
I think Disk Utility automatically appends "Media" and maybe "USB-FDU" to a string that it pulls from somewhere, but I can't find that source. how/where Disk Utility digs up the info on the drive itself?
Info:
Mac Pro (Early 2008), Mac OS X (10.7.4)
I used to use newsleecher on my pc for collecting images from newsgroups. I'm looking for something similar for my Mac, which allows me to browse newsgroups and select which images (if possible with thumbnails) to download. Any utility like that on Mac?
View 1 Replies View RelatedI have my dad's old mac book pro and am wondering if it is possible to change the information to my information. For example when I emailed my wife an invitation on icalendar my dad got it as well on his email.
Info:
Mac Pro
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?
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.....
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 RelatedI 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 RelatedCan you run two things simotaniously via one shell script?
View 1 Replies View Relatedhow to get sleeve / shell / protection for MBP?
View 24 Replies View RelatedI'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
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.
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 RelatedI 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 RelatedAfter 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)
Way to remove outer shell
Info:external drive, iOS 4.1
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 RelatedI 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.
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 RelatedWhen 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 RelatedI 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 RelatedI 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 RelatedI 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 RelatedIs 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 RelatedI 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 RelatedI 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 RelatedI 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 RelatedAnyone 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