Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Search Forums

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Showing results 1 to 24 of 24
Search took 0.01 seconds.
Search: Posts Made By: burschik
Forum: Programming/Scripts 17th June 2010, 11:07
Replies: 1
Views: 6,891
Posted By burschik
Your statement is complete syntactic nonsense and...

Your statement is complete syntactic nonsense and probably failed with an error message like:

-bash: syntax error near unexpected token `do'

The shell recognizes the first word of the command...
Forum: Programming/Scripts 19th November 2008, 12:20
Replies: 3
Views: 10,759
Posted By burschik
You are welcome. As an aside, " " is not the...

You are welcome. As an aside, " " is not the empty string, and many implementations of regular expressions (including that of GNU awk) have a particular syntax for the empty string at the beginning...
Forum: Programming/Scripts 19th November 2008, 11:46
Replies: 3
Views: 10,759
Posted By burschik
You know how regular expressions work, right? You...

You know how regular expressions work, right? You know the meaning of "the empty string at either the beginning or the end of a word", right?
Forum: Programming/Scripts 18th November 2008, 10:36
Replies: 2
Views: 3,040
Posted By burschik
Is that supposed to be php?

Is that supposed to be php?
Forum: Programming/Scripts 6th October 2008, 14:22
Replies: 3
Views: 6,549
Posted By burschik
I'm afraid it is you rather than the compiler who...

I'm afraid it is you rather than the compiler who is confused. Of course the array is called "name". That you passed a String variable also called "name" as an argument to the method is irrelevant....
Forum: Programming/Scripts 2nd October 2008, 10:34
Replies: 2
Views: 4,506
Posted By burschik
When do you have to hand in your homework?

When do you have to hand in your homework?
Forum: Programming/Scripts 30th September 2008, 09:59
Replies: 4
Views: 24,964
Posted By burschik
I don't think escaping is necessary.

I don't think escaping is necessary.
Forum: Programming/Scripts 29th September 2008, 10:19
Replies: 4
Views: 24,964
Posted By burschik
Works for me. Are you using some obscure version...

Works for me. Are you using some obscure version of vi (rather than vim, for example)?
Forum: Programming/Scripts 8th August 2008, 07:50
Replies: 1
Views: 2,896
Posted By burschik
I'm surprised it works at all. However, you can...

I'm surprised it works at all. However, you can not use NF before it has been defined. Therefore, you need to do something like this:

uptime|awk '{x=NF-2; i=NF-1; y=NF; print $x,$i,$y }'
Forum: Programming/Scripts 6th August 2008, 07:39
Replies: 6
Views: 3,086
Posted By burschik
Since the file is so short, you can use the...

Since the file is so short, you can use the "file" function to read it into an array.
Forum: Programming/Scripts 24th July 2008, 13:10
Replies: 6
Views: 23,178
Posted By burschik
AWK is what you might call a pattern processing...

AWK is what you might call a pattern processing language. It splits its input into records (delimited by newlines by default), compares each record to a number of patterns and takes appropriate...
Forum: Programming/Scripts 24th July 2008, 09:42
Replies: 6
Views: 23,178
Posted By burschik
A simple solution would be top -b -n 1 -u...

A simple solution would be

top -b -n 1 -u username | awk 'NR>7 { sum += $9; } END { print sum; }'
Forum: Programming/Scripts 16th July 2008, 11:21
Replies: 1
Views: 3,398
Posted By burschik
http://www.cups.org/documentation.php

http://www.cups.org/documentation.php
Forum: Programming/Scripts 14th July 2008, 11:57
Replies: 2
Views: 9,754
Posted By burschik
You are using an interpolated resizing operation....

You are using an interpolated resizing operation. Either use a non-interpolating resizing operation instead, or do not create a true colour destination image.
Forum: Programming/Scripts 11th July 2008, 09:22
Replies: 2
Views: 10,020
Posted By burschik
It would be a good idea to tell us what language...

It would be a good idea to tell us what language you are using, since not all regular expression implementations are created equal and since that knowledge might enable us to point out an alternative...
Forum: Programming/Scripts 9th July 2008, 10:51
Replies: 8
Views: 8,673
Posted By burschik
The OpenSSH scp/sftp commands refuse to transfer...

The OpenSSH scp/sftp commands refuse to transfer non-regular files, so you can not use a named pipe. However, there are other scp/sftp implementations. Maybe one of them will do what you want.
Forum: Programming/Scripts 1st July 2008, 15:27
Replies: 3
Views: 6,383
Posted By burschik
Try the Advanced Bash Scripting Guide at...

Try the Advanced Bash Scripting Guide at http://tldp.org/LDP/abs/html/

You need to understand that "choice" is an array variable. For this reason, "$choice" only returns the first element of the...
Forum: Programming/Scripts 1st July 2008, 13:57
Replies: 3
Views: 6,383
Posted By burschik
Apparently, you are not using the return value(s)...

Apparently, you are not using the return value(s) of zenity. Try this:

read -a choice <<EOF
$(zenity --height=600 --width=800 \
--title="Install Menu" \
--list \
...
Forum: Programming/Scripts 1st July 2008, 13:18
Replies: 2
Views: 7,562
Posted By burschik
Come to think of it, you may mean this

Array=(first second)

firstoption=(one two)

secondoption=(11 22)

for segment in ${Array[@]}; do
x=${segment}option
eval t=(\${$x[@]})
for opt in ${t[@]}; do
Forum: Programming/Scripts 30th June 2008, 12:35
Replies: 2
Views: 7,562
Posted By burschik
Do you mean

Array=(first second)

firstoption=(one two)

secondoption=(11 22)

#now i'm reading like this

for segment in "${Array[@]}"; do
x=$segment"option"
Forum: Programming/Scripts 9th June 2008, 08:48
Replies: 9
Views: 32,914
Posted By burschik
I still say there is no need to use awk

#/bin/bash

threshold=0.05
read load1 load5 load15 procs procid < /proc/loadavg

echo "isLoad15--${load15}--"
if [ ${load15/./} -gt ${threshold/./} ]
then echo "treshold exceeded"
fi
Forum: Suggest HOWTO 16th May 2008, 09:23
Replies: 3
Views: 19,072
Posted By burschik
Yes, that should work. The following commands...

Yes, that should work. The following commands should also work:

mv Great\ Lakes\ of\ the\ great\ outdoors.doc raid1/data/documents/
mv "Great Lakes of the great outdoors.doc"...
Forum: Programming/Scripts 15th May 2008, 13:05
Replies: 9
Views: 32,914
Posted By burschik
Don't use awk at all

read load1 load5 load15 procs procid < /proc/loadavg
Forum: Programming/Scripts 15th May 2008, 12:24
Replies: 1
Views: 4,812
Posted By burschik
Not really duplicate

#!/bin/awk

BEGIN { pattern = /^[[:digit:]]+-[[:digit:]]+-[[:digit:]]/; }

$1 !~ pattern { print; }

$1 ~ pattern {
if ($1 != previous_date && previous_date != "" ||
$5 !=...
Showing results 1 to 24 of 24

 
Forum Jump

All times are GMT +2. The time now is 18:20.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.