Armenian Knowledge Base  

Go Back   Armenian Knowledge Base > Technical sections > Operating Systems > Unix
Register

Reply
 
LinkBack Thread Tools
Old 02.04.2006, 21:20   #1
Silence
 
Moonlight's Avatar
 
Join Date: 11 2004
Location: back to meta level
Posts: 3,926
Downloads: 1
Uploads: 0
Blog Entries: 3
Reputation: 202 | 3
Default unix command needed. urgent

google didn't answer, ask the forum exam is tomorrow.

http://www2.wiwi.hu-berlin.de/is/exam/isi_2002w_KL2.pdf
page 2, 1c

java capitalize < input.txt > output.txt

but before can enter just "capitalize" & the java prog will be run on txt file, need a unix command, save it in some env file.. can't recall how were doing it
Reply With Quote
Old 02.04.2006, 22:03   #2
...overwined...
 
noone's Avatar
 
Join Date: 03 2003
Location: ...tortuga...
Posts: 3,429
Downloads: 3
Uploads: 0
Reputation: 158 | 3
Default Re: unix command needed. urgent

а теперь можно тоже самое на человеческом языке?...
Reply With Quote
Old 02.04.2006, 22:09   #3
Banned
 
Forever Child's Avatar
 
Join Date: 10 2001
Location: ...осень колибри
Age: 37
Posts: 7,487
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Default Re: unix command needed. urgent

я тоже нихренасеньки не понял. вопрос в чем?
Reply With Quote
Old 02.04.2006, 22:20   #4
...overwined...
 
noone's Avatar
 
Join Date: 03 2003
Location: ...tortuga...
Posts: 3,429
Downloads: 3
Uploads: 0
Reputation: 158 | 3
Default Re: unix command needed. urgent

наверно так... (если я правильно понял)...
создаешь текстовый файл, записываешь в него все ето дело, потом сохраняешь как capitalize...
потом делаешь chmod +x capitalize...
и capitalize...
или речь совсем не о том?...
Reply With Quote
Old 02.04.2006, 22:24   #5
Кашмарег...
 
Jane's Avatar
 
Join Date: 01 2006
Location: paradise on earth...
Posts: 10,625
Downloads: 4
Uploads: 0
Blog Entries: 2
Reputation: 945 | 10
Default Re: unix command needed. urgent

чего-то не в''ехала...
Reply With Quote
Old 02.04.2006, 22:32   #6
Banned
 
Forever Child's Avatar
 
Join Date: 10 2001
Location: ...осень колибри
Age: 37
Posts: 7,487
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Default Re: unix command needed. urgent

а может быть она хочет добавить в систему какую-то свою команду и вызывать ее по надобности но без обращения к полному пути?
Reply With Quote
Old 02.04.2006, 22:36   #7
Banned
 
Forever Child's Avatar
 
Join Date: 10 2001
Location: ...осень колибри
Age: 37
Posts: 7,487
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Default Re: unix command needed. urgent

ты где вообще? или это запоздавший перевоапрельский прикол? долго еще мы тут оракулами будем оставаться?
Reply With Quote
Old 02.04.2006, 22:36   #8
Silence
 
Moonlight's Avatar
 
Join Date: 11 2004
Location: back to meta level
Posts: 3,926
Downloads: 1
Uploads: 0
Blog Entries: 3
Reputation: 202 | 3
Default Re: unix command needed. urgent

i google menya neponimaet!! nikto menya ne ponimaet(( ya daje ne uverena sama task ponimayu li??

na linke j na "norma" napisano, otkrivaet'ca? ili perevodit' s english?

that's what i understand:

est' java prog, chto iz standart input (entered in console) beret txt i capitalizes it, prints in std output console.

1 iz zadach input/output redirection, s chem u menya probs netu. nado prosto vmesto std input brat' text iz txt file, capitalize it, i vmesto ptinting in std out, save result in a txt file.
comanda budet viglyadet' tak:
java capitalize < input.txt > output.txt


no, kak ya ponimayu, eto tol'ko 2ya chast' zadachi (+ esli unix zadacha daet 2 points, vsegda sostoit iz 2 chastey).
moya prob v tom, chto imho prosto enter java (?) capitalize, ne sdelaet capitalization on txt file.

ili mojet java capitalize.java (nonsense!) or capitalize.class?
esli prog esho ne compiled s javac, to on voobshe ne mojet run. i run tol'ko *.class-es.

ya ponmu, delala ran'she takoe: imeet'ca java prog, say x.java. chtob kajdiy raz, kogda xosh run x, ne enter 2 cmd lines
javac x.java
then java x, mogla kakoy-t command davat', soxranit' kakoy-t line v kakom-t env file i otnine mogla v shelle enter "x" i etot prog would run. a chto imenno delalos' dla etogo, nikak ne mogu pomnit', davno bilo. i ne poluchaet'ca pravil'no ask googleu..
chto-t ponyatno, ili esho zaputala?
Reply With Quote
Old 02.04.2006, 22:42   #9
Silence
 
Moonlight's Avatar
 
Join Date: 11 2004
Location: back to meta level
Posts: 3,926
Downloads: 1
Uploads: 0
Blog Entries: 3
Reputation: 202 | 3
Default Re: unix command needed. urgent

Childik, ya tormuz, no ne nastol'ko, chtob den' opazdat' ot fools' day!! zavtra u menya exam i 100% uverena zavalu(( v proshlom godu imenno etot zavalila! za chas daje znaya vse otveti prosto nevozmojno reshat' vse zadachi. legche vsego uml part, no na eto idet min 30 mins.. unix part xot' mojno chetko/naizust' znat' i bistro napisat', i to daje slides pod rukoy, s inetom ne mogu nayti otvet! inch anem??
Reply With Quote
Old 02.04.2006, 22:49   #10
Silence
 
Moonlight's Avatar
 
Join Date: 11 2004
Location: back to meta level
Posts: 3,926
Downloads: 1
Uploads: 0
Blog Entries: 3
Reputation: 202 | 3
Default Re: unix command needed. urgent

cho-t legche nado proverit', mojet s etim pomojete

http://www2.wiwi.hu-berlin.de/is/exam/isi_2002w_KL1.pdf
1b
set classpath={path to dir, where Main.java is}

verno? path doljen include file itself? esli da, Main.java ili main.class?
Reply With Quote
Old 02.04.2006, 23:10   #11
Какое небо, *, Багдад!
 
knightmare's Avatar
 
Join Date: 10 2005
Location: Ереван
Posts: 1,682
Downloads: 16
Uploads: 0
Reputation: 99 | 3
Default Re: unix command needed. urgent

Quote:
Originally Posted by Moonlight
ya ponmu, delala ran'she takoe: imeet'ca java prog, say x.java. chtob kajdiy raz, kogda xosh run x, ne enter 2 cmd lines
javac x.java
then java x, mogla kakoy-t command davat', soxranit' kakoy-t line v kakom-t env file i otnine mogla v shelle enter "x" i etot prog would run. a chto imenno delalos' dla etogo, nikak ne mogu pomnit', davno bilo. i ne poluchaet'ca pravil'no ask googleu..
chto-t ponyatno, ili esho zaputala?
Если используешь bash, пропиши в ~/.bash_profile

alias cmdname="real command"
Reply With Quote
Old 02.04.2006, 23:20   #12
Silence
 
Moonlight's Avatar
 
Join Date: 11 2004
Location: back to meta level
Posts: 3,926
Downloads: 1
Uploads: 0
Blog Entries: 3
Reputation: 202 | 3
Default Re: unix command needed. urgent

v comp labe bash, doma on win. eto teoreticheskie zadachi, na chto doljni otvtetit' bez pc-s, na bumage. experimentirovat', proverit' ne mojem.
Reply With Quote
Old 02.04.2006, 23:44   #13
Какое небо, *, Багдад!
 
knightmare's Avatar
 
Join Date: 10 2005
Location: Ереван
Posts: 1,682
Downloads: 16
Uploads: 0
Reputation: 99 | 3
Default Re: unix command needed. urgent

....ну вобщем, перед тем, как угадать ответ, нужно еще угадать вопрос.
Reply With Quote
Old 03.04.2006, 06:57   #14
Silence
 
Moonlight's Avatar
 
Join Date: 11 2004
Location: back to meta level
Posts: 3,926
Downloads: 1
Uploads: 0
Blog Entries: 3
Reputation: 202 | 3
Default Re: unix command needed. urgent

Quote:
Originally Posted by knightmare
....ну вобщем, перед тем, как угадать ответ, нужно еще угадать вопрос.
nu xot' uteshili, chto ne odna ya takaya neponyatlivaya! spasibo

eta chast' ya kajet'ca s chem-t drugim putayu.. kajetca eto bilo dobavit' path, chtob s lubogo mesta run prog, a ne dobrat'ca v dir, gde ona lejit. a v zadache takogo ne sprashivaet'ca!

exam v 3pm, eli do etogo mojete podtverdit'/ispravit' moi otveti, budem neopisuemo blagodarani

Last edited by Moonlight; 03.04.2006 at 07:27.
Reply With Quote
Old 03.04.2006, 07:43   #15
Шестой Лесничий
 
Varg's Avatar
 
Join Date: 08 2005
Location: Театр Теней
Age: 36
Posts: 2,657
Downloads: 1
Uploads: 0
Reputation: 65 | 3
Default Re: unix command needed. urgent

Сумбурно а может просто написать так (если я чего-то понял ):

---run.sh---
rm -f *.class
javac capitalize.java
java capitalise < $1 > $2
---run.sh---

а потом chmod 755 run.sh и вызывать:
run.sh input.txt output.txt
Reply With Quote
Sponsored Links
Reply

Thread Tools


На правах рекламы:
реклама

All times are GMT. The time now is 14:10.


Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.