File names with spaces
Hello,
I am trying to write a bash shell script that will translate spaces in file names into underline characters. This is the script as I have it now:
for file in ls
do
echo $file
newfile=`ls ${file} | tr '[:space:]' '[_*]'`
echo File is named ${file}
echo The new file is named ${newfile}
# [[ -s $newfile ]] || (mv $file $newfile)
sleep 2done
The lines that begin with echo and the sleep line are for debugging. What they have shown me is that the $file is getting set to the first word in the file name on the first iteration, the second word on the second interation, etc. (The file names look like "001 of 150 files", "002 of 150 files", etc.) So, on the first iteration, $file is egual to "001", on the second iteration $file is equal to "of", etc. Yet, if I go to the directory and issue ls, the filenames are shown as one would expect with the whole four word filename on one line.
Can anyone give me a hint on how to fix this so that the whole filename is loaded into $file?
TIA,
Sean
Signature · 7 lines
Theo. Sean Schulze [email protected] - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs
You can try to adapt this example from The Advanced Bash Scripting Guide:
http://www.tldp.org/LDP/abs/html/moreadv.html#EX57
It deletes the file, but it shouldn't be too hard to adapt to your needs.
--Brian
Quoted 25 lines · Theo. Sean Schulze
Hello,
I am trying to write a bash shell script that will translate spaces in file names into underline characters. This is the script as I have it now:
for file in
ls
doecho $file newfile=`ls ${file} | tr '[:space:]' '[_*]'` echo File is named ${file} echo The new file is named ${newfile} # [[ -s $newfile ]] || (mv $file $newfile) sleep 2done
The lines that begin with echo and the sleep line are for debugging. What they have shown me is that the $file is getting set to the first word in the file name on the first iteration, the second word on the second interation, etc. (The file names look like "001 of 150 files", "002 of 150 files", etc.) So, on the first iteration, $file is egual to "001", on the second iteration $file is equal to "of", etc. Yet, if I go to the directory and issue
ls, the filenames are shown as one would expect with the whole four word filename on one line.
Quoted 5 lines
Can anyone give me a hint on how to fix this so that the whole filename is loaded into $file?
TIA,
Sean
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Thanks, that did help, although it didn't solve the problem. I now recognize that the problem is in assigning the variable. Both my version with ls and the version with find in the example give the expected results when printing to the console, but they both fail when used to assign a string including spaces to a variable.
I need to find a way to maintain the integrity of the string as I assign it to the file variable. I tried echo (ls -1) and echo "(ls -1)", but neither works. Changing the parentheses to brackets doesn't help either.
Cheers,
Sean
On Mon, Feb 17, 2003 at 02:34:16PM -0600, Brian Jackson hunted and pecked out:
Quoted 39 lines
You can try to adapt this example from The Advanced Bash Scripting Guide:
http://www.tldp.org/LDP/abs/html/moreadv.html#EX57It deletes the file, but it shouldn't be too hard to adapt to your needs.
--Brian
Quoted 30 lines · Theo. Sean Schulze
Hello,
I am trying to write a bash shell script that will translate spaces in file names into underline characters. This is the script as I have it now:
for file in
ls
doecho $file newfile=`ls ${file} | tr '[:space:]' '[_*]'` echo File is named ${file} echo The new file is named ${newfile} # [[ -s $newfile ]] || (mv $file $newfile) sleep 2done
The lines that begin with echo and the sleep line are for debugging. What they have shown me is that the $file is getting set to the first word in the file name on the first iteration, the second word on the second interation, etc. (The file names look like "001 of 150 files", "002 of 150 files", etc.) So, on the first iteration, $file is egual to "001", on the second iteration $file is equal to "of", etc. Yet, if I go to the directory and issue
ls, the filenames are shown as one would expect with the whole four word filename on one line.Can anyone give me a hint on how to fix this so that the whole filename is loaded into $file?
TIA,
Sean
Signature · 7 lines
Theo. Sean Schulze [email protected] - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 10 lines · Theo. Sean Schulze
Thanks, that did help, although it didn't solve the problem. I now recognize that the problem is in assigning the variable. Both my version with ls and the version with find in the example give the expected results when printing to the console,
but they both fail when used to assign a string including spaces to a variable. I need to find a way to maintain the integrity of the string as I assign it to the file variable. I triedecho (ls -1)andecho "(ls -1)", but neither works. Changing the parentheses to brackets doesn't help either.
Quoted 2 lines
Cheers,
Sean
Assigning variables does not happen in the ls -1' statement. This only generates strings. You need a command that read's the variables correctly. Use read', as in:
ls -1 | while read file ; do echo "$file" ; done
or
find . -type f | while read file ; do
echo "$file"
done
or more exotic, array version.
IFS=$'\n' eval 'lines=( $(cat < $file) )'
# now you have a array of lines.... which can be proccessed further..
These all where tested and work just fine.
G00d lUcK
J.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
J.,
Thanks for your suggestions. While googling comp.unix.shell today, I found yet another method. I was not aware that "*" when used by itself matches every filename in a directory. Apparently, part of the problem I was having was a side effect of ls and find. Here is the script that I used:
#!/usr/bin/bash
for file in *
do
newfile="`echo "$file" | tr '[:blank:]' '[_*]'`" mv "$file" "$newfile"
done
I also learned something important about tr. I was using [:space:], but that is not appropriate here. [:space:] includes horizontal as well as vertical whitespace. That means I was transforming linefeeds as well as spaces. [:blank:] is exclusively horizontal whitespace, which is what I needed.
Thanks to all of you who contributed. I appreciate your help.
Cheers,
Sean
On Thu, Feb 20, 2003 at 11:22:36AM +0100, J. hunted and pecked out:
Quoted 43 lines · Theo. Sean Schulze
Quoted 11 lines
Thanks, that did help, although it didn't solve the problem. I now recognize that the problem is in assigning the variable. Both my version with ls and the version with find in the example give the expected results when printing to the console,
but they both fail when used to assign a string including spaces to a variable. I need to find a way to maintain the integrity of the string as I assign it to the file variable. I triedecho (ls -1)andecho "(ls -1)", but neither works. Changing the parentheses to brackets doesn't help either.Quoted 2 lines
Cheers,
SeanAssigning variables does not happen in the
ls -1' statement. This only generates strings. You need a command that read's the variables correctly. Useread', as in:ls -1 | while read file ; do echo "$file" ; done
or
find . -type f | while read file ; do
echo "$file"
doneor more exotic, array version.
IFS=$'\n' eval 'lines=( $(cat < $file) )'
# now you have a array of lines.... which can be proccessed further..These all where tested and work just fine.
G00d lUcK
J.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Signature · 7 lines
Theo. Sean Schulze [email protected] - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 3 lines · Theo. Sean Schulze
J.,
Thanks for your suggestions.
No problemo,
btw: 4 out of 5 pages on teamfinders.org are generating http 404 not found messages. I think you should have a critical look at all the http links in the main page.
J.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 9 lines · Theo. Sean Schulze
J.,
Thanks for your suggestions. While googling comp.unix.shell today, I found yet another method. I was not aware that "*" when used by itself matches every filename in a directory. Apparently, part of the problem I was having was a side effect of ls and find. Here is the script that I used:
#!/usr/bin/bash
for file in *
donewfile="`echo "$file" | tr '[:blank:]' '[_*]'`" mv "$file" "$newfile"
Quoted 8 lines
done
I also learned something important about tr. I was using [:space:], but that is not appropriate here. [:space:] includes horizontal as well as vertical whitespace. That means I was transforming linefeeds as well as spaces. [:blank:] is exclusively horizontal whitespace, which is what I needed.
Thanks to all of you who contributed. I appreciate your help.
Cheers,
Sean
BTW,
please remember that `blank' is a GNU extension, regarding portability issues.. etc..
~$ man isblank
J.
p.s.
Please use a more sane line-wrapping.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
On Fri, Feb 21, 2003 at 09:59:37AM +0100, J. hunted and pecked out:
[snip]
Quoted 8 lines
BTW,
please remember that `blank' is a GNU extension, regarding portability issues.. etc..
~$ man isblank
This shouldn't be a problem, since I will only be using it on GNU/Linux. Also, [:blank:] is a character set descriptor for tr. I scanned the source for tr and I don't see any calls to isblank. Should be ok for my limited usage.
Quoted 4 lines
p.s.
Please use a more sane line-wrapping.
I wasn't aware that there was a problem with my line wrapping. I have posted to the list a number of times, and you are the first to mention it. I am using mutt with vim as the editor, and it softwraps to the width of the xterm. It doesn't hardwrap at all. What is the problem specifically?
Signature · 7 lines
Theo. Sean Schulze [email protected] - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs
Problem installing avi libraries
I've been trying to install the avifiles to allow me to turn my linux box into a vcr. Unfortunately, by naivety is getting me in trouble. Here is what I've done, in what I hope is sufficient detail
Downloaded avifile-0.53.5.tar.gz and binaries-010122.zip.
# tar xvfz avifile-0.53-5.tar.gz # cd avifile-0.53-5 # ./configure
loading cache ./config.cache
checking for a BSD compatible install... (cached) /usr/bin/install -c checking whether build environment is sane... yes
checking whether make sets ${MAKE}... (cached) yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... found
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for gcc... (cached) gcc
checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking how to run the C preprocessor... (cached) gcc -E checking for c++... (cached) c++
checking whether the C++ compiler (c++ ) works... yes checking whether the C++ compiler (c++ ) is a cross-compiler... no checking whether we are using GNU C++... (cached) yes checking whether c++ accepts -g... (cached) yes
checking for a BSD compatible install... /usr/bin/install -c checking for ranlib... (cached) ranlib
checking for ld used by GCC... (cached) /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... (cached) yes checking for BSD-compatible nm... (cached) /usr/bin/nm -B checking whether ln -s works... (cached) yes
checking for object suffix... o
checking for executable suffix... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.lo... yes
checking if gcc supports -fno-rtti -fno-exceptions ... yes checking if gcc static flag -static works... -static checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the linker (/usr/bin/ld) supports shared libraries... yes
checking command to parse /usr/bin/nm -B output... ok checking how to hardcode library paths into programs... immediate checking for /usr/bin/ld option to reload object files... -r checking dynamic linker characteristics... Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for objdir... .libs
creating libtool
checking for dlopen in -ldl... (cached) yes
checking for pthreads... -lpthread yes
checking for ANSI C header files... (cached) yes
checking for fcntl.h... (cached) yes
checking for limits.h... (cached) yes
checking for malloc.h... (cached) yes
checking for sys/ioctl.h... (cached) yes
checking for sys/time.h... (cached) yes
checking for unistd.h... (cached) yes
checking for working const... (cached) yes
checking for inline... (cached) inline
checking whether time.h and sys/time.h may both be included... (cached) yes
checking whether gcc needs -traditional... (cached) no checking for 8-bit clean memcmp... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... (cached) yes
checking for working mmap... (cached) yes
checking return type of signal handlers... (cached) void checking for vprintf... (cached) yes
checking for ftime... (cached) yes
checking for gettimeofday... (cached) yes
checking for strdup... (cached) yes
checking for strstr... (cached) yes
checking for X... (cached) libraries /usr/X11R6/lib, headers /usr/X11R6/include
checking for Qt... (cached) libraries /usr/lib/qt3-gcc3.2/lib, headers /usr/lib/qt3-gcc3.2/includ
e
checking for moc... (cached) /usr/lib/qt3-gcc3.2/bin/moc checking for uic... (cached) /usr/lib/qt3-gcc3.2/bin/uic checking whether we like this Qt installation... checking for /usr/lib/qt3-gcc3.2/include/qvariant.h... (cached) yes
checking whether to build QtVidcap... checking for /usr/lib/qt3-gcc3.2/include/qtable.h... (cache
d) yes
checking for XF86DGAQueryExtension in -lXxf86dga... (cached) yes checking for XF86VidModeSwitchMode in -lXxf86vm... (cached) yes checking for sdl-config... (cached) /usr/bin/sdl-config checking for SDL - version >= 1.1.3... yes
checking whether to build ac3 decoder module... no
creating ./config.status
creating ./Makefile
creating lib/Makefile
creating lib/loader/Makefile
creating lib/videocodec/Makefile
creating lib/audiodecoder/Makefile
creating lib/videocodec/Makefile
creating lib/avifile/Makefile
creating lib/aviplay/Makefile
creating player/Makefile
creating lib/audioencoder/Makefile
creating lib/audioencoder/lame3.70/Makefile
creating lib/audiodecoder/mpeg/Makefile
creating samples/Makefile
creating samples/avitest/Makefile
creating samples/benchmark/Makefile
creating samples/extractor/Makefile
creating samples/qtvidcap/Makefile
creating include/Makefile
creating include/wine/Makefile
creating bin/Makefile
creating samples/qtrecompress/Makefile
creating avifile-config
creating avifile.spec
creating lib/videocodec/DirectShow/Makefile
creating include/config.hinclude/config.h is unchanged
Everything appears to be fine, except for the check that my compilers
are cross-compilers. The documentation isn't clear about whether this is a fatal error, so I proceeded with the next step:
# make Making all in include make[1]: Entering directory `/home/nupgup/Stuff/TV/avifile-0.53.5/include' make all-recursive make[2]: Entering directory `/home/nupgup/Stuff/TV/avifile-0.53.5/include' Making all in wine make[3]: Entering directory `/home/nupgup/Stuff/TV/avifile-0.53.5/include/wine' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/home/nupgup/Stuff/TV/avifile-0.53.5/include/wine' make[3]: Entering directory `/home/nupgup/Stuff/TV/avifile-0.53.5/include' make[3]: Leaving directory `/home/nupgup/Stuff/TV/avifile-0.53.5/include' make[2]: Leaving directory `/home/nupgup/Stuff/TV/avifile-0.53.5/include' make[1]: Leaving directory `/home/nupgup/Stuff/TV/avifile-0.53.5/include' Making all in lib make[1]: Entering directory `/home/nupgup/Stuff/TV/avifile-0.53.5/lib' Making all in loader make[2]: Entering directory `/home/nupgup/Stuff/TV/avifile-0.53.5/lib/loader' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/home/nupgup/Stuff/TV/avifile-0.53.5/lib/loader' Making all in videocodec make[2]: Entering directory `/home/nupgup/Stuff/TV/avifile-0.53.5/lib/videocodec' Making all in DirectShow make[3]: Entering directory `/home/nupgup/Stuff/TV/avifile-0.53.5/lib/videocodec/DirectShow' /bin/sh ../../../libtool --silent --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I../../../include -g -march=i586 -I/usr/X11R6/include -I/usr/include/SDL -D_REENTRANT -w -I../../../include -march=i586 -c inputpin.cpp inputpin.cpp: In constructor `CEnumPins::CEnumPins(IPin*, IPin*)': inputpin.cpp:79: invalid conversion from `long int (*)(IUnknown*, GUID*, void**)' to `long int (*)(IUnknown*, GUID*, void**)' inputpin.cpp:80: invalid conversion from `long int (*)(IUnknown*)' to `long int (*)(IUnknown*)' inputpin.cpp:81: invalid conversion from `long int (*)(IUnknown*)' to `long int (*)(IUnknown*)' inputpin.cpp:82: invalid conversion from `HRESULT (*)(IEnumPins*, long unsigned int, IPin**, ULONG*)' to `HRESULT (*)(IEnumPins*, long unsigned int, IPin**, ULONG*)' inputpin.cpp:83: invalid conversion from `HRESULT (*)(IEnumPins*, long unsigned int)' to `HRESULT (*)(IEnumPins*, long unsigned int)' inputpin.cpp:84: invalid conversion from `HRESULT (*)(IEnumPins*)' to `HRESULT (*)(IEnumPins*)' inputpin.cpp:85: invalid conversion from `HRESULT (*)(IEnumPins*, IEnumPins**)' to `HRESULT (*)(IEnumPins*, IEnumPins**)' inputpin.cpp: In constructor `CInputPin::CInputPin(CBaseFilter*, const AM_MEDIA_TYPE&)': inputpin.cpp:151: invalid conversion from `long int (*)(IUnknown*, GUID*, void**)' to `long int (*)(IUnknown*, GUID*, void**)' inputpin.cpp:152: invalid conversion from `long int (*)(IUnknown*)' to `long int (*)(IUnknown*)' inputpin.cpp:153: invalid conversion from `long int (*)(IUnknown*)' to `long int (*)(IUnknown*)' inputpin.cpp:154: invalid conversion from `HRESULT (*)(IPin*, IPin*, AM_MEDIA_TYPE*)' to `HRESULT (*)(IPin*, IPin*, AM_MEDIA_TYPE*)' inputpin.cpp:155: invalid conversion from `HRESULT (*)(IPin*, IPin*, const AM_MEDIA_TYPE*)' to `HRESULT (*)(IPin*, IPin*, const AM_MEDIA_TYPE*)' inputpin.cpp:156: invalid conversion from `HRESULT (*)(IPin*)' to `HRESULT (*)(IPin*)' inputpin.cpp:157: invalid conversion from `HRESULT (*)(IPin*, IPin**)' to ` HRESULT (*)(IPin*, IPin**)' inputpin.cpp:158: invalid conversion from `HRESULT (*)(IPin*, AM_MEDIA_TYPE*)' to `HRESULT (*)(IPin*, AM_MEDIA_TYPE*)' inputpin.cpp:159: invalid conversion from `HRESULT (*)(IPin*, PIN_INFO*)' to ` HRESULT (*)(IPin*, PIN_INFO*)' inputpin.cpp:160: invalid conversion from `HRESULT (*)(IPin*, PIN_DIRECTION*)' to `HRESULT (*)(IPin*, PIN_DIRECTION*)' inputpin.cpp:161: invalid conversion from `HRESULT (*)(IPin*, WCHAR**)' to ` HRESULT (*)(IPin*, WCHAR**)' inputpin.cpp:162: invalid conversion from `HRESULT (*)(IPin*, const AM_MEDIA_TYPE*)' to `HRESULT (*)(IPin*, const AM_MEDIA_TYPE*)' inputpin.cpp:163: invalid conversion from `HRESULT (*)(IPin*, IEnumMediaTypes**)' to `HRESULT (*)(IPin*, IEnumMediaTypes**)' inputpin.cpp:164: invalid conversion from `HRESULT (*)(IPin*, IPin**, ULONG*)' to `HRESULT (*)(IPin*, IPin**, ULONG*)' inputpin.cpp:165: invalid conversion from `HRESULT (*)(IPin*)' to `HRESULT (*)(IPin*)' inputpin.cpp:166: invalid conversion from `HRESULT (*)(IPin*)' to `HRESULT (*)(IPin*)' inputpin.cpp:167: invalid conversion from `HRESULT (*)(IPin*)' to `HRESULT (*)(IPin*)' inputpin.cpp:168: invalid conversion from `HRESULT (*)(IPin*, long long int, long long int, double)' to `HRESULT (*)(IPin*, long long int, long long int, double)' inputpin.cpp: In constructor `CBaseFilter::CBaseFilter(const AM_MEDIA_TYPE&, CBaseFilter2*)': inputpin.cpp:325: invalid conversion from `long int (*)(IUnknown*, GUID*, void**)' to `long int (*)(IUnknown*, GUID*, void**)' inputpin.cpp:326: invalid conversion from `long int (*)(IUnknown*)' to `long int (*)(IUnknown*)' inputpin.cpp:327: invalid conversion from `long int (*)(IUnknown*)' to `long int (*)(IUnknown*)' inputpin.cpp:328: invalid conversion from `HRESULT (*)(IBaseFilter*, CLSID*)' to `HRESULT (*)(IBaseFilter*, CLSID*)' inputpin.cpp:329: invalid conversion from `HRESULT (*)(IBaseFilter*)' to ` HRESULT (*)(IBaseFilter*)' inputpin.cpp:330: invalid conversion from `HRESULT (*)(IBaseFilter*)' to ` HRESULT (*)(IBaseFilter*)' inputpin.cpp:331: invalid conversion from `HRESULT (*)(IBaseFilter*, long long int)' to `HRESULT (*)(IBaseFilter*, long long int)' inputpin.cpp:332: invalid conversion from `HRESULT (*)(IBaseFilter*, long unsigned int, void*)' to `HRESULT (*)(IBaseFilter*, long unsigned int, void*)' inputpin.cpp:333: invalid conversion from `HRESULT (*)(IBaseFilter*, IReferenceClock*)' to `HRESULT (*)(IBaseFilter*, IReferenceClock*)' inputpin.cpp:334: invalid conversion from `HRESULT (*)(IBaseFilter*, IReferenceClock**)' to `HRESULT (*)(IBaseFilter*, IReferenceClock**)' inputpin.cpp:335: invalid conversion from `HRESULT (*)(IBaseFilter*, IEnumPins**)' to `HRESULT (*)(IBaseFilter*, IEnumPins**)' inputpin.cpp:336: invalid conversion from `HRESULT (*)(IBaseFilter*, const WCHAR*, IPin**)' to `HRESULT (*)(IBaseFilter*, const WCHAR*, IPin**)' inputpin.cpp:337: invalid conversion from `HRESULT (*)(IBaseFilter*, void*)' to `HRESULT (*)(IBaseFilter*, void*)' inputpin.cpp:338: invalid conversion from `HRESULT (*)(IBaseFilter*, IFilterGraph*, const WCHAR*)' to `HRESULT (*)(IBaseFilter*, IFilterGraph*, const WCHAR*)' inputpin.cpp:339: invalid conversion from `HRESULT (*)(IBaseFilter*, WCHAR**)' to `HRESULT (*)(IBaseFilter*, WCHAR**)' inputpin.cpp: In constructor `CBaseFilter2::CBaseFilter2()': inputpin.cpp:457: invalid conversion from `long int (*)(IUnknown*, GUID*, void**)' to `long int (*)(IUnknown*, GUID*, void**)' inputpin.cpp:458: invalid conversion from `long int (*)(IUnknown*)' to `long int (*)(IUnknown*)' inputpin.cpp:459: invalid conversion from `long int (*)(IUnknown*)' to `long int (*)(IUnknown*)' inputpin.cpp:460: invalid conversion from `HRESULT (*)(IBaseFilter*, CLSID*)' to `HRESULT (*)(IBaseFilter*, CLSID*)' inputpin.cpp:461: invalid conversion from `HRESULT (*)(IBaseFilter*)' to ` HRESULT (*)(IBaseFilter*)' inputpin.cpp:462: invalid conversion from `HRESULT (*)(IBaseFilter*)' to ` HRESULT (*)(IBaseFilter*)' inputpin.cpp:463: invalid conversion from `HRESULT (*)(IBaseFilter*, long long int)' to `HRESULT (*)(IBaseFilter*, long long int)' inputpin.cpp:464: invalid conversion from `HRESULT (*)(IBaseFilter*, long unsigned int, void*)' to `HRESULT (*)(IBaseFilter*, long unsigned int, void*)' inputpin.cpp:465: invalid conversion from `HRESULT (*)(IBaseFilter*, IReferenceClock*)' to `HRESULT (*)(IBaseFilter*, IReferenceClock*)' inputpin.cpp:466: invalid conversion from `HRESULT (*)(IBaseFilter*, IReferenceClock**)' to `HRESULT (*)(IBaseFilter*, IReferenceClock**)' inputpin.cpp:467: invalid conversion from `HRESULT (*)(IBaseFilter*, IEnumPins**)' to `HRESULT (*)(IBaseFilter*, IEnumPins**)' inputpin.cpp:468: invalid conversion from `HRESULT (*)(IBaseFilter*, const WCHAR*, IPin**)' to `HRESULT (*)(IBaseFilter*, const WCHAR*, IPin**)' inputpin.cpp:469: invalid conversion from `HRESULT (*)(IBaseFilter*, void*)' to `HRESULT (*)(IBaseFilter*, void*)' inputpin.cpp:470: invalid conversion from `HRESULT (*)(IBaseFilter*, IFilterGraph*, const WCHAR*)' to `HRESULT (*)(IBaseFilter*, IFilterGraph*, const WCHAR*)' inputpin.cpp:471: invalid conversion from `HRESULT (*)(IBaseFilter*, WCHAR**)' to `HRESULT (*)(IBaseFilter*, WCHAR**)' inputpin.cpp: In constructor `CRemotePin2::CRemotePin2(CBaseFilter2*)': inputpin.cpp:478: invalid conversion from `long int (*)(IUnknown*, GUID*, void**)' to `long int (*)(IUnknown*, GUID*, void**)' inputpin.cpp:479: invalid conversion from `long int (*)(IUnknown*)' to `long int (*)(IUnknown*)' inputpin.cpp:480: invalid conversion from `long int (*)(IUnknown*)' to `long int (*)(IUnknown*)' inputpin.cpp:481: invalid conversion from `HRESULT (*)(IPin*, PIN_INFO*)' to ` HRESULT (*)(IPin*, PIN_INFO*)' inputpin.cpp: In constructor `CRemotePin::CRemotePin(CBaseFilter*, IPin*)': inputpin.cpp:488: invalid conversion from `long int (*)(IUnknown*, GUID*, void**)' to `long int (*)(IUnknown*, GUID*, void**)' inputpin.cpp:489: invalid conversion from `long int (*)(IUnknown*)' to `long int (*)(IUnknown*)' inputpin.cpp:490: invalid conversion from `long int (*)(IUnknown*)' to `long int (*)(IUnknown*)' inputpin.cpp:491: invalid conversion from `HRESULT (*)(IPin*, PIN_DIRECTION*)' to `HRESULT (*)(IPin*, PIN_DIRECTION*)' inputpin.cpp:492: invalid conversion from `HRESULT (*)(IPin*, IPin**)' to ` HRESULT (*)(IPin*, IPin**)' inputpin.cpp:493: invalid conversion from `HRESULT (*)(IPin*, AM_MEDIA_TYPE*)' to `HRESULT (*)(IPin*, AM_MEDIA_TYPE*)' inputpin.cpp:494: invalid conversion from `HRESULT (*)(IPin*, PIN_INFO*)' to ` HRESULT (*)(IPin*, PIN_INFO*)' make[3]: *** [inputpin.lo] Error 1 make[3]: Leaving directory `/home/nupgup/Stuff/TV/avifile-0.53.5/lib/videocodec/DirectShow' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/nupgup/Stuff/TV/avifile-0.53.5/lib/videocodec' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/nupgup/Stuff/TV/avifile-0.53.5/lib' make: *** [all-recursive] Error 1
Now these errors are a bit more worrisome, and this is as far as I've
been able to get. Here is my kernal info
Linux version 2.4.18-24.8.0 ([email protected]) (gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)) #1 Fri Jan 31 07:28:55 EST 2003
Has anyone out there seen similar errors? Do you think the problem is really with gcc, or am I off base? I've done some research, and I don't know what I'm supposed to be cross-compiling to.
Thanks
Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Re: Problem installing avi libraries
Quoted 5 lines · Peter Howell
I've been trying to install the avifiles to allow me to turn my linux box into a vcr. Unfortunately, by naivety is getting me in trouble. Here is what I've done, in what I hope is sufficient detail
Downloaded avifile-0.53.5.tar.gz and binaries-010122.zip.
[details deleted]
The current version of avifile is 0.7.32 (20030219), available for download at http://avifile.sourceforge.net/ .
The version you are trying to compile is so old that only luck would make it compatible with the current g++ compiler and its libraries. (The cross-compiler check result is just fine, BTW ... it merely confirms that you are compiling the source for the same architecture, presumably i86, that you are compiling it on.) A quick glance at the error listing is not enough to let me spot the problem, except to note that all the individual errors reported are the same in character ... the compiler objecting to attempts to cast a variable from a type to the same type ... why the compiler treats that as an error is not immediately apparent to me, to be honest.
One other general comment: the move from g++-2.95 to g++-3.02 is causing headaches everywhere, and I don't know which of them your RH system uses (to find out, start with "ls -l /usr/bin/c++" and keep folloing symlinks until you get to a real name). The newest version of avifile is written to work with g++-3.02 and its headers and libraries (libstdc++-5.something_or_other).
I'd suggest you try again with the current source, and report any problems you have with it, either here or on the avifile mailing list ([email protected]; join it at the sourceforge site listed above).
--
-------------------------------------------"Never tell me the odds!"--------
Ray Olszewski -- Han Solo
Palo Alto, California, USA [email protected]
-------------------------------------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 8 lines · Theo. Sean Schulze
On Fri, Feb 21, 2003 at 09:59:37AM +0100, J. hunted and pecked out:
[snip]Quoted 6 lines
BTW,
please remember that `blank' is a GNU extension, regarding portability issues.. etc..
Quoted 8 lines
Quoted 2 lines
~$ man isblank
This shouldn't be a problem, since I will only be using it on GNU/Linux. Also, [:blank:] is a character set descriptor for tr. I scanned the source for tr and I don't see any calls to isblank. Should be ok for my limited usage.
Quoted 4 lines
p.s.
Please use a more sane line-wrapping.I wasn't aware that there was a problem with my line wrapping. I have posted to the list a number of times, and you are the first to mention it. I am using mutt with vim as the editor, and it softwraps to the width of the xterm. It doesn't hardwrap at all. What is the problem specifically?
Sorry, I dont want to be pedantric. But here your lines are 90 characters long.. Or so long that they run off-screen as in no newlines..
All other messages are displayed correctly.
J.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
file transfer via telnet
In reply to J.I year or two back, I remember reading about a way to transfer a file using telnet. It think it involved redirection from one tty to another, but I don't remember the details. I now find myself in a situation with telnet access, but no ftp (or anything else I could use to upload files). Do any of you guys know the telnet method?
Cheers,
Steven
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Re: file transfer via telnet
Hi Steven,
Quoted 6 lines
I year or two back, I remember reading about a way to transfer a file using telnet. It think it involved redirection from one tty to another, but I don't remember the details. I now find myself in a situation with telnet access, but no ftp (or anything else I could use to upload files). Do any of you guys know the telnet method?
This might not help, but if you have ssh access you could use scp (secure copy).
Regards,
Nathan
Quoted 10 lines
Cheers,
Steven-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Signature · 9 lines
I'm as confused as a baby in a topless bar ! -- - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs
Re: file transfer via telnet
If I'm not mistaken, you cannot do that because telnet transfers only ASCII caracters or something like that (terminal related caracters)... There isn't a way to tell it to transfer something in binary (like ftp's "binary").
But if you find a way, please e-mail it to me!
Best regards,
Rodolpho Eckhardt
São Paulo - Brazil
It´s believed that the following words were said by Nathan:
Quoted 38 lines
Hi Steven,
Quoted 6 lines
I year or two back, I remember reading about a way to transfer
a file using telnet. It think it involved redirection from one
tty to another, but I don't remember the details. I now find
myself in a situation with telnet access, but no ftp (or anything else I could use to upload files). Do any of you guys know the
telnet method?This might not help, but if you have ssh access you could use scp (secure copy).
Regards,
NathanQuoted 10 lines
Cheers,
Steven-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs--
I'm as confused as a baby in a topless bar !
--
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs
Signature · 10 lines
Rodolpho H. O. Eckhardt [email protected] Cel: 11 9126-9107 - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs
Re: file transfer via telnet
Quoted 3 lines · Rodolpho H. O.
If I'm not mistaken, you cannot do that because telnet transfers only ASCII caracters or something like that (terminal related caracters)... There isn't a way to tell it to transfer something in binary (like ftp's "binary").
Isn't there some way to solve this with uudecode and uuencode? I don't know how, but those programs make it possible to transfer binary files over ASCII-only mediums.
From the man-page uudecode:
Uuencode and uudecode are used to transmit binary files over transmission mediums that do not support other than simple ASCII data.
If someone knows *how* to do it, plz let the list know...
HTH
--
Jos Lemmerling on Debian GNU/Linux jos(@)lemmerling(.nl)
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Re: file transfer via telnet
In reply to [email protected]Quoted 9 lines · On Fri, 21 Feb 2003 [email protected] wrote:
I year or two back, I remember reading about a way to transfer a file using telnet. It think it involved redirection from one tty to another, but I don't remember the details. I now find myself in a situation with telnet access, but no ftp (or anything else I could use to upload files). Do any of you guys know the telnet method?
Cheers,
Steven
Telnet is one of the oldest base proto's arround. So where you want to look is: http://www.rfc-editor.org
Start at RFC856
J.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Re: file transfer via telnet
In reply to [email protected]Quoted 10 lines · On Fri, 21 Feb 2003 [email protected] wrote:
I year or two back, I remember reading about a way to transfer a file using telnet. It think it involved redirection from one tty to another, but I don't remember the details. I now find myself in a situation with telnet access, but no ftp (or anything else I could use to upload files). Do any of you guys know the telnet method?
Cheers,
Steven
I think that was rsh, not telnet, and man rsh tells the rules for that, in case you have rsh.
However, to downoad a file by telnet, capture stdout so:
telnet hostname | tee logfile
....
uuencode remotefile remotefile
exit
tr -d "r" < logfile | uudecode
Note remotefile is named twice in the uuencode: first is the name it is to be uudecoded to, next is the input to uuencode (uou could use redirection or a pipe instead, by default uuencode operates on stdin.
To upload, I guess you could use telnet's ! command, but how exactly excapes me.
Lawson
--
---oops---
________________________________________________________________
Sign Up for Juno Platinum Internet Access Today
Only $9.95 per month!
Visit www.juno.com
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Re: file transfer via telnet
Quoted 8 lines
However, to downoad a file by telnet, capture stdout so:
telnet hostname | tee logfile
....
uuencode remotefile remotefile
exit
tr -d "r" < logfile | uudecode
Ok, I understand. But what is this 'tr -d "r"' for?
Thiago
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Re: file transfer via telnet
Quoted 9 lines · Thiago F.G. Albuquerque
Quoted 8 lines
However, to downoad a file by telnet, capture stdout so:
telnet hostname | tee logfile
....
uuencode remotefile remotefile
exit
tr -d "r" < logfile | uudecode
Quoted 3 lines
Ok, I understand. But what is this 'tr -d "r"' for?
Thiago
He's trying to remove the octal '\015' or '\r' newline terminator. BUT the tr -d 'r' command removes the ascii character 'r' as in octal '\162'.
Little mistake.. I guess. This could disrupt potentialy the encode file.
references:
man ascii
B.T.W.
tr -d '\015' works also als a DOS to UNIX newline converter. I have it as a handy alias in my .bashrc.
alias nodos="tr -d '\015'"
nodos < my_msdos_newline.txt > my_unix_newline.txt
J.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Re: file transfer via telnet
In reply to Thiago F.G. AlbuquerqueQuoted 10 lines · Thiago F.G. Albuquerque
Quoted 8 lines
However, to downoad a file by telnet, capture stdout so:
telnet hostname | tee logfile
....
uuencode remotefile remotefile
exit
tr -d "r" < logfile | uudecodeOk, I understand. But what is this 'tr -d "r"' for?
It is a typo for
tr -d "\r"
to remove the carriage returns. Most versions of uudecode don't like then, especially on the "end" line. IIRC slackware had a "fromdos" program to do it, but tr works just as well for uuencoded data - there are no control characters in the data itself.
tr -d "r" shouldn't trash anything, but it won't do what I wanted it to, either. And I tested the whole thing before I put it in the mail wrong.
Quoted 2 lines
Thiago
Lawson
--
---oops---
________________________________________________________________
Sign Up for Juno Platinum Internet Access Today
Only $9.95 per month!
Visit www.juno.com
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Re: file transfer via telnet
In reply to [email protected]Quoted 7 lines · On Fri, 21 Feb 2003 [email protected] wrote:
However, to downoad a file by telnet, capture stdout so:
telnet hostname | tee logfile
....
uuencode remotefile remotefile
exit
tr -d "r" < logfile | uudecode
tr -d "\r" < logfile | uudecode
of course. Sorry.
Lawson
--
---oops---
________________________________________________________________
Sign Up for Juno Platinum Internet Access Today
Only $9.95 per month!
Visit www.juno.com
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs