« first day (492 days earlier)      last day (2553 days later) » 

6:16 AM
@tripleee
#!/bin/bash
# copy the /usr/bin directory listing to a log file
today=`date +%y%m%d`
ls /usr/bin -al > log.$today
What is the use of log?
What does the last statement mean?
 
it creates a file named log.(date) with the output from ls -al /usr/bin
google "redirection"
@BasilPaul ^
 
Okay
 
6:45 AM
@Queen k
 
7:33 AM
is it possible to have 2 variables in awk (from different regex)
tail -f $inputfile | awk '/ErrorCode:100107/{key=$2":"$3;a[key]++;if (LK && LK != key){print LK,a[LK]+1;delete a};LK=key}' FS='[-:]' in this command I want to have LK as "$2:$3" from a different regex
 
8:21 AM
@pythonRcpp not sure what you are asking, in the same Awk script? you are already setting key to that value, aren't you?
like this? tail -f "$inputfile" | awk '/foo/ { LK=$2 ": $3 } /ErrorCode:100107/ { ...
but if the ErrorCode regex hits before foo you will have LK undefined at that point
 
 
1 hour later…
9:24 AM
Maybe something like :
tail -f "$inputfile" | awk -v LK="some sensible value" '/foo/ { LK=$2 ": $3 } /ErrorCode:100107/ { ...
 
@louigi600 yeah, that would work, too
except I made a typo, there needs to be a closing double quote after the colon, obvo
 
and I blindly copied it because I just wanted to add the -v
 
10:26 AM
@Queen k
 
 
5 hours later…
 
1 hour later…
5:49 PM
anyone know how to start a fresh sync with unison if accidentally drop my folder ?
this one was the command i try to use again unison /Users/XXX/Documents/server ssh://kross@XXXX.XXXX.XXXX.XXXX//var/www/html/test
 
 
4 hours later…
 
1 hour later…
10:23 PM
@tripleee I was doing a little cleanup in documentation and moved the "man pages" topic from the Bash tag to the unix tag; then I realized that there was one Bash specific example in there, but examples can't be moved across tags.

I wanted to roll the topic move back, move the example, then move the topic again, but the rollback has to be reviewed. If you feel so inclined: http://stackoverflow.com/documentation/review/changes/138353?filter-tags=unix
Ugh, already the first reject for "Can't see any difference at all" :/
 

« first day (492 days earlier)      last day (2553 days later) »