Search Results

Search: Posts Made By: konsolebox
1,816
Posted By konsolebox
I'd do it this way: #!/bin/bash ...
I'd do it this way:

#!/bin/bash

USER=BARSPIN
HOTKEYS_PATH="/home/$USER/Documents/bash/tibia/HOTKEYS"

CFG[1]="A"
CFG[2]="B"
CFG[3]="C"
...

EXIT=0

if [[ -e $HOTKEYS_PATH ]]; then
...
10,250
Posted By konsolebox
I remember finding this bug but probably my...
I remember finding this bug but probably my modification didn't went through.

In the world of awk yes, but there's no way I would do that in C, and somehow doesn't make me want to do it in awk as...
16,553
Posted By konsolebox
Speaking of gawk's extended match this is one way...
Speaking of gawk's extended match this is one way for that:
#!/usr/bin/gawk -f

{
if (match($0, /^[^\[]+\[([^ ]+).*xyz_session_id\/=([^ &]+)/, t)) {
k = t[1]; v = t[2]
a[k]...
6,812
Posted By konsolebox
I don't really get what you're after but here's...
I don't really get what you're after but here's some hint for bash:
#!/bin/bash

CONFIGFILE=<path to file>
LOGFILE=<path to log file>

read URL < "$CONFIGFILE"

echo "Fetching $URL..."
wget...
3,322
Posted By konsolebox
I know some of ksh but I'm not yet used to it so...
I know some of ksh but I'm not yet used to it so I wrote this in bash. I hope you at least get the concept:

#!/bin/bash

LOGFILE=<path to logfile>

C0=$(fgrep -c 'Connection Error'...
2,521
Posted By konsolebox
just change it to *.txt cat *.txt ...
just change it to *.txt
cat *.txt ...
69,396
Posted By konsolebox
Or you can just use &: sed 's/.\{3\}/&...
Or you can just use &:
sed 's/.\{3\}/& /g'
16,933
Posted By konsolebox
Hello. I hope you don't mind another suggestion....
Hello. I hope you don't mind another suggestion. Try to use getline instead:
awk '
BEGIN {
while (getline < ARGV[1]) {
a = $1

if (!(getline < ARGV[2])) {
...
8,121
Posted By konsolebox
Maybe it's also safer to include underscore: ...
Maybe it's also safer to include underscore:
awk 'NR==FNR{a[$1 "_"]=$2 "_";next}{ for (i in a) gsub(i,a[i])}1' template.txt input.txt
Although the 1st and 3rd parts are in different forms: AAAA0 to...
Showing results 1 to 9 of 9

 
All times are GMT -4. The time now is 04:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy