| |
| |
| |
|
Comments:
<0> i guess you can output binary data using the awk in plan9 <1> WuWei: Nice. <1> WuWei: I had to use hexdump + awk for some binary pattern matching. <0> yes but you have to use plan9 :-P <1> WuWei: Not for my method, though mine is slow and cumbersome ;) <0> i see, plan9 awk has a function utf() <1> hexdump < file.bin | awk '/fecabeba0000/ { print "This is a Java file!"; }' <0> i thought about using uudecode to output a sound file under unix <1> WuWei: That'd be interesting. <1> WuWei: hexdump is 1:1 correspondence with the file, though. <1> WuWei: And you can see the output. <0> yes but it only converts binary to text. not vice-versa <1> WuWei: Oh, well; you can't win them all. <1> WuWei: I could write something in awk that uses %b if it's supported to do bit values... along with a pipe. I'd have to think about that. <0> awk -f program.awk|uudecode should do the trick
<0> of course you have to implement uuencode in awk <0> someone did that already. let me give you the link <1> WuWei: I've done it. <1> WuWei: That's why I'm thinking of it as an interview question. <0> :-) <0> http://ucxray.berkeley.edu/~jamesh/elves/scripts/tuencode.awk <1> WuWei: I don't necessarily want the candidate to write it; just to tell me what he'd need. <0> in that case, am i a unix guru? :-P <0> there may be other ways of course, like MIME or base64 <0> but uuencode is in the base system <1> WuWei: I don't know; let me look at that. <1> WuWei: And no, you haven't p***ed. I want you to tell me what you'd use. <1> WuWei: Oh, for your thing. <1> WuWei: Yeah, that looks good. <1> WuWei: I thought you meant the web server. Yeah, coolio. <0> :-) <1> OKi, nap time. <1> Z z . <0> see you later... <1> Z z . <2> hello <3> huhu xmb <4> hello <4> i have text file with any line , i need join odd line to even line, 1 to 2 and 3 to 4 ... is it possible with sed? or awk ? <5> yes <1> Bonjour. <6> hu genocide <3> sup ? <6> nix <6> unerlaubt zuhause <6> gibts fma noch <6> noed nach f10 on google <6> du sup <3> ka.. <3> ig bi am heartbeat und drbd irichte <3> :) <6> drwas <3> http://www.drbd.org/ <3> raid-1 over network <3> :] <6> ic <6> soelli au <6> mm ka ziit <6> heartbeat ****s, heard and halfway tried <6> tra <6> need to go soon <6> crapshiyt**** <7> hi <7> How do I connect to a port using awk <8> haha <8> shantanu: You don't. <7> hmm <8> Why would you want to? <8> What do you want to do? <7> connect to a port and send data <8> I see. <8> Any experience with any programming/scripting languages? <7> python yes
<8> Do it in python? <7> no just wondering whether awk can do it <7> I have already done it in Python <8> ok <8> "The Awk text-processing programming language is a useful and simple tool for manipulating text." <7> right <7> can one do it with shell? <8> Depends. <7> ? <8> Depends on the shell. <8> Recent versions of bash, can do socket stuff, if compiled with the needed options. <7> bash or ksh <8> Or maybe you could use a tool, like "netcat" or something. <7> ok <7> thanks <1> goldfish: HeH. <8> ? :) <1> goldfish: We added "what would you need to build a web server using only bash and UNIX tools?" to our interview questions. <8> hehe. <1> goldfish: netcat is one of the things you'd need :) <8> Can I have a job? :) <1> goldfish: Sure. Where do you live? <8> Ireland! <1> goldfish: Are you willing to relocate to the Bay Area? <1> goldfish: Damn. <1> goldfish: Hrm... <1> goldfish: Have you worked in the US before? <8> Nah, I'm still at university. <1> goldfish: If you have/had an H-1B visa already our HR folk will push the paperwork through. <8> 2 years left :-( <1> goldfish: Ah. <1> goldfish: Which Ireland? Ireland-Ireland or the UK Ireland? <1> goldfish: Lemme think... <8> Well they're both the same island. <8> UK Ireland is called "Northern Ireland" <8> I live in the Republic Of Ireland <1> goldfish: Being in the EU, I can definitely recommend you for an internship at ASDA. <8> :) <1> goldfish: Ah, Ireland-Ireland. c001!!! <1> goldfish: ;) <8> ASDA as in the supermarket? :) <1> goldfish: Yes. <8> hehe <8> I'll probably end up there, stacking shelves. <1> goldfish: Next year, around this time, we'll be piloting some pretty cool stuff there. <1> goldfish: That's why I need the hardcore *NIX guys now. <8> nice <1> goldfish: So Stay Tuned around December; that's when I let people know about our internships if the channel rules allow for that. <8> Okies. <8> :) <1> goldfish: You'd submit your paperwork and stuff around January, and the company will let you know by mid-February if you're good to go. <8> Ah right. <8> Well, I probably wouldn't be, I haven't had a proper job in the IT sector yet. We do it in second semester of 3rd year. <8> Which starts in 2 weeks yay! <1> goldfish: HeH. <1> goldfish: You'll be good to go next year then :) <8> :) <8> We do proper hardcore networks this year, should be fun. <8> Although we have to do it in C, the lecturer hates all other programming languages. <8> And also speaking of netcat, I should really learn more about it. <1> goldfish: C 0wnZ. <8> HArd to grasp at first :) <1> goldfish: Tell your teacher that in a perfect world you guys would learn an ***embler first, then C. <1> goldfish: If you did that, C would be dead easy :) <1> goldfish: In my day sonny, that's how it was done because... well, C compilers came out much later than BASIC and ***emblers for personal computers :) <1> goldfish: Let me know if you need help with C. <8> cool, thanks :) <8> cya
Return to
#awk or Go to some related
logs:
find: invalid -size type $_GET or $ REMOTE_ADDR uk2 acroread ubuntu cannot execute binary file modem lights fc5 totem dpkg-reconfigure blue screen #linux #linux #asm edgan 5.5 #python
|
|