07-31-2009
The $ in front of the string causes it to try to
execute the string and feed
its output into ed, not feed it into ed directly. Which is a new one on me. Shells are such weird things.
cat <<< "asdf" works fine, as does
cat <<< "$varname".
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a little script to help me manage a gallery of image files. It makes symbolic links to every file in and below the current directory, placing them in a target directory which is passed to the script as a parameter. Unfortunately, the script pukes when I pass a parameter that contains... (4 Replies)
Discussion started by: TanRanger
4 Replies
2. UNIX for Advanced & Expert Users
If have
var='$variable'
how can I expand $variable.
I have tried many thing like duble quotes/braces etc, but nothing worked.
I need the solution ASAP. (2 Replies)
Discussion started by: Bsk
2 Replies
3. Shell Programming and Scripting
Ummm can anybody help me with this one?
Its prob quite simple.
I bascially have a file name say J1x2x3x7.dat
Im using the file name as a variable in a bash script. Want I want to do is extract most of the file name and make it a new variable expect with say one of the number now a... (2 Replies)
Discussion started by: RichieFondel
2 Replies
4. Shell Programming and Scripting
I have some troubles with variables and quotes...
I want:
if $URL is empty (no user input) go to http://www.localhost/index.php/ else add this string (search) "?s=+$URL"
EXAMPLE:
No user input
string= http://www.localhost/index.php/
User input = "unix"
string=... (3 Replies)
Discussion started by: aspire
3 Replies
5. Shell Programming and Scripting
Hi Guys,
I have an issue with awk and variables. I have trawled the internet and forums but can't seem to get the exactt syntax I need.
I have tried using awk -v and all sorts of variations but I have hit a brick wall. I have spent a full day on this and am just going round in circles.
... (3 Replies)
Discussion started by: gazza-o
3 Replies
6. Shell Programming and Scripting
Sometimes it is handy to protect long scripts in C++.
The following syntax works fine for simple commands:
#define SHELLSCRIPT1 "\
#/bin/bash \n\
echo \"hello\" \n\
"
int main ()
{
cout <<system(SHELLSCRIPT1);
return 0;
}
Unfortunately for there are problems for:
1d arrays:... (10 Replies)
Discussion started by: frad
10 Replies
7. Shell Programming and Scripting
Trying to do so
echo "111:222:333" |awk -F: '{system("export TESTO=" $2)}'But it doesn't work (2 Replies)
Discussion started by: urello
2 Replies
8. Shell Programming and Scripting
My OS is Linux (kernel 4.08.something) and AIX (7100-04-01-1543), the used ksh versions are:
ksh88: Version M-11/16/88f (AIX)
ksh93: Version M 93t+ 2009-05-01 (AIX), Version M 93u (Linux)
When writing a parser for stanza files in ksh i encountered a rather strange behavior. Here is a... (4 Replies)
Discussion started by: bakunin
4 Replies
9. UNIX for Beginners Questions & Answers
I pass an argument to bash as run. The first command in green executes as expected, however the second in blue fails as the $run does not expand. I tried to escape the variable with \ thinking the quotes were making the literal translation and also "${run}" but both did not work to expand the... (3 Replies)
Discussion started by: cmccabe
3 Replies
10. UNIX for Beginners Questions & Answers
Hi Guys,
I wrote a collection of bash functions years ago and now need to use them again but
I'm getting some error messages when eval tries to expand the variables names.
I recollect that I used the shopt command to set one of the options but I can't quite
remember the command that I... (8 Replies)
Discussion started by: ASGR
8 Replies
pubsub(1) BSD General Commands Manual pubsub(1)
NAME
pubsub -- Utility for managing RSS/Atom subscriptions via the PubSub framework
SYNOPSIS
pubsub [--client bundleID] subcommand [parameters]
OPTIONS
The available options are as follows:
--client Force tool to act as one specific client
ENVIRONMENT
The pubsub tool is a command-line utility for interacting with the PubSub framework. It is intended for troubleshooting, as a simple way to
see at a glance all the feed subscriptions that the agent will be periodically fetching, and to delete any left-over subscriptions (for exam-
ple, of an application that's been deleted.)
If the --client flag is given, the tool will act only on the PubSub client with the given bundle ID. For example, pubsub list will list only
the feeds that client is subscribed to. Some subcommands, such as subscribe, require a client to be specified.
The following subcommands are supported. Note that some have multi-word names. If no subcommand is given, a short listing of their names will
be output.
list Lists all feeds (of all clients, or of the specific client if the -client flag is given.) The title, URL and refresh interval of each
feed are shown. Note that a feed subscribed by multiple clients will be listed once per client, and that each client may specify a
different refresh interval. However, the PubSub agent will only fetch one copy of the feed, at the minimum interval. The interval is
listed in parentheses if it is inherited from the client's default refresh interval. The interval is followed by a " * " if the feed
will be refreshed even when the client application is not currently running. The interval is followed by a " * " if file enclosures
will automatically be downloaded.
list clients
Lists all registered clients by bundle ID, along with their number of subscriptions.
list client bundleID
Lists only the feeds subscribed to by the given client.
unsubscribe URL
Unsubscribes from the feed with the given URL.
subscribe URL
Subscribes the client (which must be specified using --client ) to the given feed.
list URL
Lists all entries currently stored for the given feed.
dump URL
Prints the raw XML of the feed, as it was last fetched from the network.
list entry identifier
Lists the attributes of an individual entry, given its identifier (a 40-char hex string).
dump entry identifier
Prints the XML of an entry, given its identifier (a 40-char hex string).
refresh URL
Fetches the feed from the network immediately, and updates the database if it has changed.
listen [timestamp]
Installs a PSClient delegate and listens for changes to subscribed feeds and entries, printing messages when they occur. If a time-
stamp is given, all changes that have occurred since that time will first be printed. The timestamp is given as a number of seconds
since the system "reference date", i.e. the same as the result of -[NSDate timeIntervalSinceReferenceDate].
list downloads
Lists all enclosures currently being downloaded.
list enclosures
Lists all enclosures, and their current download status.
FILES
~/Library/PubSub/
Per-user PubSub configuration/data directory
EXAMPLES
pubsub list
pubsub --client com.example.SurfNews subscribe http://example.com/UninterestingFeed.xml
pubsub unsubscribe http://example.com/UninterestingFeed.xml
Mac OS X 10.5 February 1, 2007 Mac OS X 10.5