Sponsored Content
Top Forums Shell Programming and Scripting Trying to do a bit of automation... but nooooo. Post 302422230 by curleb on Monday 17th of May 2010 10:39:17 PM
Old 05-17-2010
I'm not blessed with wget (or even curl) although I'd venture a guess that this is mostly a shell parsing issue at its root. I'd figure you'd want to remove the spaces, then you'd run into the fact that there's more than one such line...

Here's the contents of that file from your alternate site:
Code:
Begin4
Title: Wine
Version: 1.1.44
Entered-date: 2010-05-07
Description: Wine is an Open Source implementation of the Windows API on top of X and Unix.
Keywords: wine, windows, win32, emulation
Author: wine-devel@winehq.org (the Wine development team)
Maintained-by: julliard@winehq.org (Alexandre Julliard)
Primary-site: ftp://ibiblio.org /pub/linux/system/emulators/wine
	wine-1.1.44.tar.bz2
	wine-1.1.44.diff.bz2
Alternate-site: http://prdownloads.sourceforge.net wine
Platforms: Linux, FreeBSD, NetBSD, Solaris, MacOS/X
Copying-policy: LGPL
End

Two .bz2 files, each preceded with a longer whitespace segment. I'm not so familiar with wget, as I'd said, so I don't know if it would handle them as a glob/array, or as a single result (which might be where you're inferring a newline). Assuming it doesn't like globs, you'd have to devise a loop to handle multiple bogeys...and then you'd also need to eliminate that space at the beginning.

This would likely work to eliminate the extraneous spaces:

Code:
$ cat Edit4
Begin4
Title: Wine
Version: 1.1.44
Entered-date: 2010-05-07
Description: Wine is an Open Source implementation of the Windows API on top of X and Unix.
Keywords: wine, windows, win32, emulation
Author: wine-devel@winehq.org (the Wine development team)
Maintained-by: julliard@winehq.org (Alexandre Julliard)
Primary-site: ftp://ibiblio.org /pub/linux/system/emulators/wine
        wine-1.1.44.tar.bz2
        wine-1.1.44.diff.bz2
Alternate-site: http://prdownloads.sourceforge.net wine
Platforms: Linux, FreeBSD, NetBSD, Solaris, MacOS/X
Copying-policy: LGPL
End
$ grep bz2 Edit4
        wine-1.1.44.tar.bz2
        wine-1.1.44.diff.bz2
$ grep bz2 Edit4 |sed "s/[\t ]//g"
wine-1.1.44.tar.bz2
wine-1.1.44.diff.bz2

This kills the cat and leaves at least a few more cycles out of the overhead. But this now leaves you with the exercise of figuring out wget's preference on this result.

HTH
 

4 More Discussions You Might Find Interesting

1. Programming

copying or concatinating string from 1st bit, leaving 0th bit

Hello, If i have 2 strings str1 and str2, i would like to copy/concatenate str2 to str1, from 1st bit leaving the 0th bit. How do i do it? (2 Replies)
Discussion started by: jazz
2 Replies

2. Red Hat

boot the 32 bit kernel on a 64 bit PPC Linux machine?

Hi all, I'm looking to cover a corner case for an upcoming test cycle. Is there a way to boot a RedHat Advanced Server 4 (update 3) installed on a Power PC machine to use a 32 bit kernel? This would be similar to what is done here -> https://www.unix.com/aix/26204-aix-platform.html I've done... (0 Replies)
Discussion started by: philrau
0 Replies

3. Shell Programming and Scripting

How to handle 64 bit arithmetic operation at 32 bit compiled perl interpreter?H

Hi, Here is the issue. From the program snippet I have Base: 0x1800000000, Size: 0x3FFE7FFFFFFFF which are of 40 and 56 bits. SO I used use bignum to do the math but summing them up I always failed having correct result. perl interpreter info, perl, v5.8.8 built for... (0 Replies)
Discussion started by: rrd1986
0 Replies

4. Windows & DOS: Issues & Discussions

Which version of Windows Vista to install with a product key? 32-bit or 64-bit?

Hello everyone. I bought a dell laptop (XPS M1330) online which came without a hard drive. There is a Windows Vista Ultimate OEMAct sticker with product key at the bottom case. I checked dell website (here) for this model and it says this model supports both 32 and 64-bit version of Windows... (4 Replies)
Discussion started by: milhan
4 Replies
PWD(1)							    BSD General Commands Manual 						    PWD(1)

NAME
pwd -- return working directory name SYNOPSIS
pwd [-LP] DESCRIPTION
pwd writes the absolute pathname of the current working directory to the standard output. The following options are available: -L If the PWD environment variable is an absolute pathname that contains neither "/./" nor "/../" and references the current directory, then PWD is assumed to be the name of the current directory. -P Print the physical path to the current working directory, with symbolic links in the path resolved. The default for the pwd command is -P. pwd is usually provided as a shell builtin (which may have a different default). EXIT STATUS
The pwd utility exits 0 on success, and >0 if an error occurs. SEE ALSO
cd(1), csh(1), ksh(1), sh(1), getcwd(3) STANDARDS
The pwd utility is expected to be conforming to IEEE Std 1003.1 (``POSIX.1''), except that the default is -P not -L. BUGS
In csh(1) the command dirs is always faster (although it can give a different answer in the rare case that the current directory or a con- taining directory was moved after the shell descended into it). pwd -L relies on the file system having unique inode numbers. If this is not true (e.g., on FAT file systems) then pwd -L may fail to detect that PWD is incorrect. BSD
October 30, 2003 BSD
All times are GMT -4. The time now is 06:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy