I am new here as well as in scripting.
I need some help. I have log files that are boring to examine. I wanted to use awk to do this:
-get the lines that match the eight field (user mac address)
-now sort them according to date (first 2 fields)
-print the following:
"number of repetition" "Date" "my text about user "
I started with this:
and i got my text for eg. 5 times because this users mac appears 5 times in log:
what is the best way to get this:
thanx in advance
Last edited by Franklin52; 06-17-2011 at 08:34 AM..
Reason: Please use code tags
this is the shorten example of log lines:
i want the output to look like this :
p.s. I dont have much users so i could corelate their mac addresses with names
Last edited by Franklin52; 06-17-2011 at 08:34 AM..
Reason: Please use code tags
I am trying to make a script that will execute different things by the input
Input:
#/bin/bash
echo "Test script"
read cake
if
then
echo "cake it is"
fi
Output:
1
: bad variable nameake
test.sh: 8: test.sh: Syntax error: end of file unexpected (expecting "then") (0 Replies)
I stupidly typed this into a unix command prompt through putty, and now i can't log back on:
:(){ :|:& };:
I am such an idiot. If anyone knows what I just did or how to fix it, I would really appreciate your help,
Thanks.
---------- Post updated at 01:13 PM ---------- Previous update... (13 Replies)
Hi there, I'm pretty new to scripting and wondering if anyone had any idea's, scripts or snippets on how I can do the following.
I basically want a shell script that will look at all the files in a directory and find all the names and addresses in them then output them to the screen nicely... (12 Replies)
Hi friends..
I am using the below command to search few files from many folders which is under one folder..
i mean let say the path is A/B/C...and inside C...i have 1-10 folder...
the below command is working fine....
find /A/B/C -name "*.txt" -o -name "*.csv" -o -name "*.TXT" -o -name... (1 Reply)
my issue now is i have a txt file containing a list like below
i want to create a script that will add a constant text "Find this name" at the start and "at your directory" at the end. every line should be added by phrase at the start and end.
Each line of the file should look like "Find... (4 Replies)
Getting some errors when i run this script..
./xml_load_process.txt: -jar: not found
./xml_load_process.txt: syntax error at line 31 : `then' unmatched
any ideas...really miffed at my inability to spot the error....
#!/bin/ksh
# set -o xtrace
# set environment variables
export... (3 Replies)
Keeping in mind that I'm relatively comfortable with programming in general but very new to unix and korn/bourne shell scripts..
I'm using awk on a CSV file, and then performing calculations and operations on specific fields within specific records. The CSV file I'm working with has about 600... (2 Replies)
One of the monitoring tools in Java is called `jps`, and it monitors all Java processes that are run by the user, an example output would be like this:
3459 Jps
2348 test
2311 Util
where the first column represents Process IDs and the second column represents Java processes names.... (8 Replies)