04-22-2013
Thanks Hanson.
Is it possible to do this in tcl ? Need only ip address without the "c="
For eg,
set urlvar <one of the URLs mentioned earlier>
set ipout [regexp "s/.*\(c=[^&]*\).*d=.*/\1/p" $urlvar]
puts "$ipout"
10 More Discussions You Might Find Interesting
1. HP-UX
Hi,
Pls tell me any command in Hp-unix to find out the machine ipaddress
Thanks,
shruti (14 Replies)
Discussion started by: shruti_mgp
14 Replies
2. Shell Programming and Scripting
Hi everybody
for file in *
#Bash performs filename expansion
#+ on expressions that globbing recognizes.
do
output="`grep -n "$1" "$file"`"
echo "$file: `expr "$output" : '\(^.*$\)'`"
done
In the above bash script segment, I try to print just the first line of string named... (3 Replies)
Discussion started by: jonas.gabriel
3 Replies
3. UNIX for Dummies Questions & Answers
Hi Friends,
I am new to UNIX. I wonder how can I get the ipaddress of my machine? In windows, i can use ipconfig to get my ipaddress. I am aware of ifconfig but it does not give the ipaddress.:)
Thanks and regards,
Dinesh Venkatesan. (4 Replies)
Discussion started by: DineshV
4 Replies
4. Shell Programming and Scripting
Hi all,
I have one question regarding sed regexp (or any regexp in general),
I have some path like this
C:/Abc/def/ghi/jkl in a file file1
Now if i use following code
cat file1 | sed 's#\(.*\)/.*#\1#'
Now it give me following output
C:/Abc/def/ghi, which is fine
But i just... (2 Replies)
Discussion started by: sarbjit
2 Replies
5. UNIX for Dummies Questions & Answers
i am totally confused now, when I use find command, why it does not take the regular express as filename?
for example, i want to find out anything include word "chapter" in their file names, and i used the below command
find / -name ".*chapter.*"
and the system gives me nothing, although... (2 Replies)
Discussion started by: fedora
2 Replies
6. Shell Programming and Scripting
Hi,
I searched in the forums, but I didn't find a good solution. My problem is:
I have a string like "TEST.ABC201005.MONTHLY.D101010203".
I just want to have the string until the D100430, so that the string should look like: "TEST.ABC201005.MONTHLY.D"
The last characters after the D can be... (8 Replies)
Discussion started by: elifchen
8 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I'm curious about how to do a very simple thing with regular expressions that I'm unable to figure out.
If I want to find out if a string contains 'a' AND 'b' AND 'c' it can be very easily done with grep:
echo $STRING|grep a|grep b|grep c
but, how would you do that in a single... (9 Replies)
Discussion started by: jimcanoa
9 Replies
8. UNIX and Linux Applications
There is a linux server in my team where everyone is using xterm to connect to the server and work.
Problem is I'm unable to find the ipaddress of the xterm user. It just shows the display as "localhost".
example:
st_capuk@MGTS5026-13sh1:~> ps -eaf | grep xterm
1010 9328 9327 0 May07 ?... (2 Replies)
Discussion started by: Arun_Linux
2 Replies
9. Shell Programming and Scripting
I'm probably just not thinking of the correct term to search for :-) But I want to match a pattern that might be 'ABC' or '1ABC' there might be three characters, or there might be four, but if there are four, the first has to be 1 (1 Reply)
Discussion started by: jnojr
1 Replies
10. Shell Programming and Scripting
Trying to find and replace one string with another string in a file
#!/usr/bin/perl
$csd_table_path = "/file.ntab";
$find_str = '--bundle_type=021';
$repl_str = '--bundle_type=021 --target=/dev/disk1s2';
if( system("/usr/bin/perl -p -i -e 's/$find_str/$repl_str/' $csd_table_path")... (2 Replies)
Discussion started by: cillmor
2 Replies
LEARN ABOUT DEBIAN
web2disk
WEB2DISK(1) calibre WEB2DISK(1)
NAME
web2disk - part of calibre
SYNOPSIS
web2disk URL
DESCRIPTION
Where URL is for example http://google.com
Whenever you pass arguments to web2disk that have spaces in them, enclose the arguments in quotation marks.
OPTIONS
--version
show program's version number and exit
-h, --help
show this help message and exit
-d, --base-dir
Base directory into which URL is saved. Default is .
-t, --timeout
Timeout in seconds to wait for a response from the server. Default: 10.0 s
-r, --max-recursions
Maximum number of levels to recurse i.e. depth of links to follow. Default 1
-n, --max-files
The maximum number of files to download. This only applies to files from <a href> tags. Default is 2147483647
--delay
Minimum interval in seconds between consecutive fetches. Default is 0 s
--encoding
The character encoding for the websites you are trying to download. The default is to try and guess the encoding.
--match-regexp
Only links that match this regular expression will be followed. This option can be specified multiple times, in which case as long
as a link matches any one regexp, it will be followed. By default all links are followed.
--filter-regexp
Any link that matches this regular expression will be ignored. This option can be specified multiple times, in which case as long as
any regexp matches a link, it will be ignored. By default, no links are ignored. If both filter regexp and match regexp are speci-
fied, then filter regexp is applied first.
--dont-download-stylesheets
Do not download CSS stylesheets.
--verbose
Show detailed output information. Useful for debugging
SEE ALSO
The User Manual is available at http://manual.calibre-ebook.com
Created by Kovid Goyal <kovid@kovidgoyal.net>
web2disk (calibre 0.8.51) January 2013 WEB2DISK(1)