![]() |
Quote:
|
One thing I realized... It does filter out three levels... That I understood, but I realize now that I only need to take out the first two... and I don't know whot o mod the sed command you gave me to do only two...
Some more help please ? ;) |
Quote:
If you are using GNU sed you can substitute the entire brackets part with \? which means zero or once. GNU sed is as far as I know not a standard part of Mac OS X but can be installed with fink. chris |
I actually found a way "around" this in my AS... Because I wanted to take out part of a path, an issue came up with the slashes in what I wanted to remove... a friend of mine, used to perl, told me that I could try to replace those with = signs... and it does work...
So what I did is, indstead of trying to remove the first two parts, I added variables... I have a part that will change form user to user, but that one they have to input at the begining of the screipt anyways... So, since I have that part as a string, and know the first part is always /Volumes/, it created a new variable containing both in the right order and then entered them in sed like this: du -ch " & variable & " | col -b | sed 's=" & variable & "==' > ~/Desktop/ServerName.txt variable = /Volumes/server_name_variable And now I have my nice cleaned up output ! AS does have features that can be very usfull some times... Thanks for all the help ! |
| All times are GMT -5. The time now is 06:23 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.