Search Results

Search: Posts Made By: hungryd
6,255
Posted By hungryd
I have no idea how to delete a duplicate...
I have no idea how to delete a duplicate post/reply. Oh well.
6,255
Posted By hungryd
But xmllimit is native on macOS and xmlstarlet is...
But xmllimit is native on macOS and xmlstarlet is not:
Fink - Package Database - Package xmlstarlet (Command-line XML manipulation tool)...
6,255
Posted By hungryd
Thank you Nezabudka. This is great AND includes...
Thank you Nezabudka. This is great AND includes the line breaks. I wasn't seeing those with some of the other XML parsing tool options I'd experimented with in shell including:

xmllint --xpath...
6,255
Posted By hungryd
How to pull multiple XML tags from the same XML file in Shell.?
I'm searching for the names of a TV show in the XML file I've attached at the end of this post. What I'm trying to do now is pull out/list the data from each of the <SeriesName> tags throughout the...
5,749
Posted By hungryd
The debate over what my previous code may or may...
The debate over what my previous code may or may not do is worthwhile but not the point of my post. The point was to ask: how can i automate -- inside of the script -- for stdout and stderr to be...
5,749
Posted By hungryd
Syntax when using the 'exec' command
Hey gang,

I'm confused about the 'exec' command. I get the basics. I can redirect stdout and stderr to one log file with:

exec >> $logFile 2>&1

However, that code requires admin rights. In...
2,775
Posted By hungryd
had no idea about IFS but will certainly dig into...
had no idea about IFS but will certainly dig into that now, thank you! the code is working on my mac and i'm loving it. appreciate it.

---------- Post updated 12-02-15 at 09:31 AM ----------...
2,775
Posted By hungryd
Appreciate the follow up. The issue now is a bit...
Appreciate the follow up. The issue now is a bit more devious: setting an array with these values doesn't know how to break up the resulting text! Perhaps another problem for another thread, perhaps...
2,775
Posted By hungryd
@RudiC - I'm not familiar with either NF or NR....
@RudiC - I'm not familiar with either NF or NR. I'm using something like networksetup -listallnetworkservices | awk '{print $11-$20}' and it's returning a lot of zeros. Your example only returns...
2,775
Posted By hungryd
Parsing OSX UNIX command results which print in multiple lines
from the CLI on a Mac, if you type networksetup -listallnetworkservices then you get results in a multi-line paragraph that look something like this:

networksetup -listallnetworkservices
An...
3,304
Posted By hungryd
i appreciate the quick response! if the...
i appreciate the quick response!

if the range command (which i'd never heard of) is more effective at passing a list of values than the array command, why bother using the array command? it...
3,304
Posted By hungryd
Bash question: working with an array of previously set variable strings
while i've used arrays to work with variables, i've never used them to loop through a set of strings and wanted to ask the community for some feedback or assistance.

let me be specific. here's my...
1,889
Posted By hungryd
didn't know about pkill so thank you. otherwise,...
didn't know about pkill so thank you. otherwise, i'm all about elegance. if i can do something in two lines of code, i don't care what those two lines are. yours is great but as i'm already using...
1,889
Posted By hungryd
verdepollo: single quotes didn't work. tried that...
verdepollo: single quotes didn't work. tried that before i posted.
Corona688: many thanks, for the fix. didn't think to quote the variable.

cheers, folks,
d
1,889
Posted By hungryd
Problems passing strings within an array
i have a list of apps that i need to forcequit and, from time to time, that list changes. perfect excuse to manage a single array! however, my strings with spaces aren't passing as i'd like them to....
Forum: OS X (Apple) 05-07-2012
3,074
Posted By hungryd
three answers in one: a) didn't know...
three answers in one:

a) didn't know wildcards couldn't be called in quotes.
b) the reminder about my backslash.
c) including the cp into the if statement.

way more elegant now. thank you!!
Forum: OS X (Apple) 05-07-2012
3,074
Posted By hungryd
using variables when copying files
smaller sample from a larger script: i'm simply trying to copy files from one desktop directory on a mac to another using variables. when i first test the logic of the script without variables,...
18,895
Posted By hungryd
also my thanks to cfajohnson! didn't mention that...
also my thanks to cfajohnson! didn't mention that before, gents, sorry.
18,895
Posted By hungryd
fascinating
ikon,

that worked. can you or the others explain the syntax for me?

i'd used:
uVolume=`echo "$Volume" | sed 's/ /\\ /g'` and got no results

you suggested:
uVolume=`echo "$Volume" | sed 's/...
18,895
Posted By hungryd
assigning SED output to a variable = trouble!
i'm on a Mac running BSD unix.

i have a script in which i ask the user to input the name of a mounted volume. i then call SED to substitute backslashes and spaces in place of the spaces. that...
Showing results 1 to 20 of 20

 
All times are GMT -4. The time now is 05:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy