Scrutinizer, Well until this works, .previouscm.txt is just a text file with random letters and numbers. Once this script works, I will add a few lines at the bottom writing all of the current url's to the text file, so if the URL appears in the text file it will do nothing.
When I grep it, nothing is returned, as shown in bash debug:
I also tried the double quotes, didn't help.
Corona688, The Dilbert URL is 113 character, http://dilbert.com/dyn/str_strip/000...rip.sunday.gif, and that is too large?
If so, I should change the code to output each url to separate files and have the old urls in separate files and diff them?
Hello,
I have a very stupid/simple problem, but for some reason I cannot figure out...and I need your help!
I am writting a bash scrip that should be executed using "my_script X Y Z T" where X Y Z and T can be any string, but there can be any number of arguments.
I want my script to do... (4 Replies)
This script is called fuu;
#!/bin/bash
speak() {
case $1 in
1)echo one
;;
2)echo two
;;
3)echo three
;;
esac
}
speak
exit 0
when i run fuu 2 i expect "two" like... (2 Replies)
1. The problem statement, all variables and given/known data:
Write a shell program called myenv which takes one argument. The argument should be the name of an environment variable, such as PATH HOME etc. myenv should print out the value of the variable given as the argument. If no argument is... (1 Reply)
this script moves all the doc files to a specified directory....i have managed to put an argument but the problem im facing is puting the full path where the scripts are moving to for example i want to run the script like this below
./loo -d then path where im moving the files (i.e ./loo -d the... (2 Replies)
This script moves all the doc files to a specified directory. I have managed to put an argument but the problem I am facing is putting the full path where the scripts are moving to, for example I want to run the script like this below
./loo -d then path where im moving the files (i.e ./loo -d... (3 Replies)
Could someone help me with the script below?
I am trying to make a script having just one arguement as a command and then it executes the appropriate code
#!/bin/bash
if
then
echo "Available commands:"
echo "./exec.sh cmd1"
echo "./exec.sh cmd2"
elif
then
cmd1 =... (1 Reply)
Hi,
I wanted to pass an argument to a bash script. So that the argument is used inside the awk command inside the bash script.
I know the noraml way of passing argument to a bash script as below :
sh myScript.sh abc
Inside the bash script i can use like this
myArg1=$1
wc $myArg
But... (8 Replies)
I'm reading Wicked Cool Shell Scripts. For some reason, the function pasted in below gives the error: ./inpath2: line 10: in_path()
4 {
5 cmd=$1 ourpath=$2 result=1
6 oldIFS=$IFS IFS=":"
7
8 for directory in "$ourpath"
9 do
10 if ; then
11 result=0
12 fi... (9 Replies)
Hello everyone,
Could someone please explain to me why I get cd: too many arguments when I select a dir that has one or more spaces in the name?
This is the code
#!/bin/bash
tmp_loc=$(zenity --file-selection --directory)
if ]; then
exit 0
else
location=${tmp_loc// /\\ } # this... (7 Replies)
Discussion started by: soichiro
7 Replies
LEARN ABOUT DEBIAN
mainline
MAINLINE(1) General Commands Manual MAINLINE(1)NAME
mainline - command line interface to Dosage
SYNOPSIS
mainline [options] module [module...]
DESCRIPTION
mainline is a command line interface to Dosage. Dosage is a an application designed to keep a local 'mirror' of specific web comics and
other picture-based content, such as 'Picture Of The Day' sites, with a variety of options for updating and maintaining collections.
OPTIONS -b PATH, --base--path=PATH
Specifies a base path to put comic subdirectories. The default is 'Comics'.
--base-url=PATH
Specifies the base URL for output events. The default is a local file URI.
-c, --catch-up
Traverses all available strips until an (identical) existing one is found. This can be useful if your collection was previously up
to date, but you've missed a few days worth of strips. Alternatively you can specify -c twice for a 'full catchup', which will not
stop until all comics have been traversed. Catchups can 'resumed' by using the index syntax, see the INDEX SYNTAX and SPECIAL SYNTAX
sections for more information.
-h, --help
Output brief help information.
-l, --list
List available comic modules in multi-column fashion.
--single-list
List available comic modules in single-column fashion.
-m MODULE, --module-help=MODULE
Output module-specific help for MODULE.
-o OUTPUT, --output=OUTPUT
OUTPUT may be any one of the following:
text - Provides no additional output and is the default value.
html - Writes out an HTML file linking to the strips actually downloaded in the current run, named by date (ala dailystrips). The
files can be found in the 'html' directory of your Comics directory.
rss - Writes out an RSS feed detailing what strips were downloaded in the last 24 hours. The feed can be found in Comics/daily-
dose.xml.
rss - Writes an RSS feed with all of the strips downloaded during the run, for use with your favourite RSS aggregator.
-p, --progress
Display a progress bar while downloading comics.
-q, --quiet
Decrease the output level by one with each occurence.
-t, --timestamps
Print timestamps for all output at any level.
-v, --verbose
Increase the output level by one with each occurence.
-V, --version
Display the version number. module At least one valid module must be specified. A list of valid modules can be found by passing the
-l option. Multiple module arguments can be specified on the command line.
INDEX SYNTAX
One can indicate the start of a list of comma seperated indices using a ':'.
If -c is specified with index syntax then 'resume' mode is activated, where a 'catchup' will start at the given index.
Refer to EXAMPLES for samples.
OFFENSIVE COMICS
Some users may find certain comics offensive and wish to disable them. Modules listed in /etc/dosage/disabled and ~/.dosage/disabled will
be disabled. These files should contain only one module name per line.
SPECIAL SYNTAX
@ This expands to mean all the comics currently in your 'Comics' directory.
@@ This expands to mean all the comics available to Dosage.
INDEX SYNTAX can be used with SPECIAL SYNTAX but this is unlikely to be useful.
EXAMPLES
Retrieve the latest Mega Tokyo comic:
mainline MegaTokyo
Retrieve every strip from every comic that there is a module for:
mainline -c @@
Retrieve all Penny Arcade strips from (and including) a given index to the beginning regardless of whether they already exist or not:
mainline -c PennyArcade:2004-07-22
ENVIRONMENT
HTTP_PROXY
mainline will use the specified HTTP proxy whenever possible.
NOTES
Should retrieval fail on any given strip mainline will attempt to retry. However the retry information is only outputted in the second and
successive output levels.
At the time of writing, a complete Dosage collection weighs in at around 3.0GB.
BUGS
See http://trac.slipgate.za.net/dosage for a list of current development tasks and suggestions.
FILES
/etc/dosage/disabled
Disables comic modules on a global scale.
~/.dosage/disabled
Disables comic modules on a local scale.
AUTHORS
mainline and Dosage were written by Jonathan Jacobs <korpse@slipgate.za.net> and Tristan Seligmann <mithrandi@slipgate.za.net>. This manual
page was written by Jonathan Jacobs.
MAINLINE(1)