Покажи Публикации - Dark_Dreamer
* Виж публикациите на потр. | Виж темите на потр. | Виж прикачените файлове на потр
Страници: [1]
1  Програмиране / Общ форум / Re: Помощ за един лесничък скрипт -: Dec 29, 2008, 20:31
blagodarq i na dvamata! nz za6to e dadeno s expr i az no 6te go mahna za6toto qvno sigurno ne6to ne e kakto trqbva.
2  Програмиране / Общ форум / Re: Помощ за един лесничък скрипт -: Dec 27, 2008, 22:16
ами просто копи пастнах условието защото е от един енг саит, накратко какво трябва да прави скрипта е като го рънваш в терминала заедно с някакъв текст които съдържа думата plus да замени тази дума с знака +


Например да кажем че програмта се казва neshtosi

$ ./neshtosi x is 5 plus 6 plus 7 plus 8

да изведе на екрана

x is 5 + 6 + 7 + 8
3  Програмиране / Общ форум / Re: Помощ за един лесничък скрипт -: Dec 27, 2008, 18:17
wow 100 vijdaniq na temata nikoi li ne moje da pomogne!?
4  Програмиране / Общ форум / Помощ за един лесничък скрипт -: Dec 26, 2008, 02:40
Здравейте нов съм в програмирането на скриптове  и имам нужда от вашата помощ за следния скрипт:

Substitution of text within a file: Now suppose you wanted to find and replace some words in a text file. You could do this manually using find and replace in a text editor. However, you could also write a script to automate the task. Here is an example which replaces 'plus' with '+':

echo "x is 5 plus 6" | sed 's/plus/+/g'
We now use sed instead of grep. In the expression s/plus/+/g, the 's' means substitute the second part (separated by '/') for the first and the 'g' means do this everywhere rather than just on the first occurrence. However it is possible to write this in one line (without error checking) using regular expressions. Below is a template, can you fill in the regular expression?

#!/bin/sh
expr `echo $* | sed ''`
exit 0

Въобще нямам представа как да го напиша този скрипт   :(
Страници: [1]