Admins, how often do you use Sed and Awk? Finding first linux job

Arkitech

Diamond Member
Apr 13, 2000
8,356
4
76
I'm working on trying to get really familiar and comfortable with a wide range of sys admin commands. I often see sed and Awk in scripts and I was curious if it's something I need to know as a future admin.

In the meantime I'm working on learning how to use grep, tcpdump, env, top, kill, nice and a few others. I think I need to find projects for myself to get better acquainted with the many commands. I would love to find a job doING linux support even in small amounts so that I can work with it everyday, instead of just a couple of hours in the evening.
 
Feb 25, 2011
16,984
1,616
126
I've never used them, but that doesn't mean they aren't useful tools. It's simply a matter of purpose.

sed and awk are basically very powerful text processing tools - awk is arguably its own programming language. Doing basic Linux sysadmin'ey tasks, you won't use that any more than you'll program a GUI in Visual Basic as a windows sysadmin.

If you're doing something more complex or higher-level (i.e., not taking calls from users) you will probably want to learn _some_ toolset to do text processing/parsing, etc. (For analyzing logfiles and stuff) but I use Python for that because I am not a masochist.

If you want to learn to do Linux well really fast, make your kids use it. Between the, "Dad, how do I..." and the "Kid, how the hell did you..." the rest will take care of itself.
 
Last edited:

lxskllr

No Lifer
Nov 30, 2004
59,108
9,541
126
I'm not an admin, but I recently used sed to make a task that would have been extremely tedious, very easy. I think I could have made it easier than what I did, but it still worked well. Simplifying, I had to remove every fourth line from a large text file. It was a little more complicated than that(room for improvement), but I was pleased with the results.
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
As a programmer that uses Linux as my IDE I use sed and grep daily. I prefer inline ruby or perl over awk though.
 

VinDSL

Diamond Member
Apr 11, 2006
4,869
1
81
www.lenon.com
I use awk, gawk, sed, grep, regex, and (dare I say) curl on a regular basis.

It probably wouldn't hurt brushing up on these things... ;)
 

Red Squirrel

No Lifer
May 24, 2003
69,744
13,357
126
www.betteroff.ca
I would not say I use it daily but a lot of my monitoring rules in my monitoring system use a combination of those tools to get the exact thing I want out of a command output. Typically I google the syntax because I don't know it off hand. Usually involves some crafty use of grep, sed, awk etc.
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,575
4,489
75
I've never used awk unless I found some script online. I only use sed if I need to manipulate a lot of files the same way, or in a Bash script.

Otherwise I use (G)Vim. :twisted: And a lot of Bash scripting with grep and sed and such. And sometimes Perl.

What's wrong with curl?

cURL is a serious power tool. I prefer to use wget on a daily basis.
 

Red Squirrel

No Lifer
May 24, 2003
69,744
13,357
126
www.betteroff.ca
I heard of curl before but never thought of looking at what it actually does.

Actually looks very interesting, and could be useful for my automation/monitoring stuff. Say I have a web based app that outputs sensor values via web page I could use curl to get the values for example.
 

Red Squirrel

No Lifer
May 24, 2003
69,744
13,357
126
www.betteroff.ca
Was going to start a new thread but thought I'd just ask here... with curl, how do you stop it from outputting this:

Code:
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     1    0     1    0     0      7      0 --:--:-- --:--:-- --:--:--     9

If I type it directly in command line it's fine, but if it's part of a script it outputs that too.
 

theevilsharpie

Platinum Member
Nov 2, 2009
2,322
14
81
Was going to start a new thread but thought I'd just ask here... with curl, how do you stop it from outputting this:

Code:
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     1    0     1    0     0      7      0 --:--:-- --:--:-- --:--:--     9

If I type it directly in command line it's fine, but if it's part of a script it outputs that too.

curl -s