ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
ls *jpeg | sed 's%\(.*\)%<a href=\1> <IMG SRC=\1> </A>%' > jpeg.href.html
Or if you do need a actual script:
Code:
#!/bin/bash
ls *jpeg | sed 's%\(.*\)%<a href=\1> <IMG SRC=\1> </A>%' > jpeg.href.html
Both use sed to substitute the jpeg into the html line. This is done by backreferencing: This part \(.*\) tells sed that it should look for .* (everything on a line), the \( and \) are there to tell sed that you want to use the found part in the replacement part, which is done by using \1.
ls *jpeg | sed 's%\(.*\)%<a href=\1> <IMG SRC=\1> </A>%' > jpeg.href.html
Or if you do need a actual script:
Code:
#!/bin/bash
ls *jpeg | sed 's%\(.*\)%<a href=\1> <IMG SRC=\1> </A>%' > jpeg.href.html
Both use sed to substitute the jpeg into the html line. This is done by backreferencing: This part \(.*\) tells sed that it should look for .* (everything on a line), the \( and \) are there to tell sed that you want to use the found part in the replacement part, which is done by using \1.
Hope this helps.
thank you
in the mean time I found this
Pff ... Programmign is not soo easy... Let s make it
BlitzMax
BlitzMax is a new complete 2D/3D game programming language... A great number of programmers use this language and can help beginners...
Win, Linux, MacOS
BLOC
BLOC is a programming language which translates sources to Pascal code and compile them into stand-alone EXEs. It is multiplatform…
Win, Linux, QNX, PalmOS
Blunt Axe Basic
Blunt Axe Basic is a basic-like programming language that offers a console mode 32 bit compiler. The langauge is a subset of the QBasic/QuickBasic 4.5 dialect…
Win, Linux
Euphoria
Euphoria is a free Basic-like language compiler... It does not create GUI programs itself, but there are now a number of free libraries…
Win, Linux
FreeBasic
With FreeBasic the user need to know only DOS Basic. FreeBASIC is compatible with QBasic and QuickBasic... it may create OBJ, LIB, DLL, console and GUI EXEs…
Win, Linux
Gambas
Gambas is a Basic-like language with object extensions inspired by Java... Althought it does not complie to a real stand alone EXEs...
Linux
GNU Liberty Basic
The GNU/Liberty Basic Compiler Collection is a suite of free libraries to compile Liberty Basic code to a small and fast stand-alone application…
Win, Linux
Hbasic
HBasic is RAD Basic like language for Linux... Throught its complete and excellent IDE you may create, execute and fully debug programs…
Linux
Kbasic
KBasic is very similar to VisualBasic with some elements of Java... is well structured... but the language and the programming IDE is not stable…
Win, Linux
OmniBasic
OmniBasic has a good and intuitive IDE similar to Visualbasic but it is not a RAD... The language is simple to understand and the documentation is well written...
Win, Linux
Phoenix
Phoenix Object Basic is a RAD development tool... It's a fully object-oriented language... it offers a visual designer to build GUIs…
Win, Linux
PureBasic
Great programming Basic-like language... more the 600 commands...OpenGL and DirectX... assembly code directly in the source code... no RAD…
Win, Linux, Amiga, MacOS
RapidQ
Rapid-Q is a cross platform Basic free programming language... Thousands of programmers develope with it and are implementing new functions…
Win, Linux, Sun, HP-UX
RealBasic
Extremely well built, powerful and complete IDE. Very professional working environment RAD. Valid alternative to VisualBasic... Not so small EXEs…
Win, MacOs, Linux
ScriptBasic
Scriptbasic is language similar to Basic. It supports a rich set of instructions... Unfortunately Scriptbasic produces only console mode applications…
Win, Linux, Unix
SmallBasic
Smallbasic is a simple computer language... strong mathematics and graphics. It is not a developer tool for professional programmers…
Win, Linux, PalmOs, DOS
X11-Basic
X11-Basic is a Basic interpreter with full X graphic capability. The syntax is most similar to the old GFA-Basic ATARI ST implementation…
Linux, Unix
xBasic
Free Win32 and Linux Basic-like language... simple but complete programming language... The working environment is not really nice...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.