Recent content by techbulk

  1. T

    head and tail trick

    Best I've found so far: head -c 4 passwd > part1 | tail -c +56 passwd | head -c 2 > part2 | tail -c 3 passwd > part3 | head -q part1 part2 part3 Works at times, but not always, so I don't think this is an optimized solution.. But maybe we're getting there!
  2. T

    head and tail trick

    Bearer of bad news, I'm sooo sorry coz it's impressive as hell that you came up with this, but I'm not allowed to define functions either, it's really supposed to be a one-line thingy. I'm gonna ask to see the rules of the challenge again coz the only way this seems possible is if the semicolons...
  3. T

    head and tail trick

    Maybe I didn't explain myself too well, but we're to do it in one line, that's why it seems so impossible...
  4. T

    head and tail trick

    Yeah, it's a tough one... I'll share the answer when I have it for sure! And thanks for the tip, I'll check in later, see if someone else has a light bulb moment.
  5. T

    head and tail trick

    Yup, got it here, thanks for the confirmation! head -c 4 passwd; tail -c +56 passwd | head -c 2; tail -c 2 passwd Only problem is the challenge forbids using semicolons... So back to square one.
  6. T

    head and tail trick

    The challenge is to only use head and tail. I bet this could be done easily using other commands for sure!
  7. T

    head and tail trick

    How kind! I'd take a hint any day to be frank. I've come up with the following but those forbidden characters (semicolons) keep me up at night: head -c 4 passwd; tail -c +56 passwd | head -c 2; tail -c 2 passwd
  8. T

    head and tail trick

    No, it's for a friendly competition. I've already given up coz I'm not super Linux literate, but I was curious to know the answer. If this does sound too close to homework, you can remove my question. Wouldn't want to go against any guidelines. Thanks.
  9. T

    head and tail trick

    Hi, I have a file (ASCII text) called passwd which contains the following string: DirticaVduURPjDwfEkzjTAmPbDRelukkuraPhedgdnrKSXlIJgMrKayBqPTTFdngQXoCxJZMImwMrhFidkixjLSAwnqkhdYgWlkbwjEEtwBdZaJhakSbHQYVBknit I need to extract the first 4 characters of the string, followed by the 2 characters...
Top