Search Results

Search: Posts Made By: sulti
2,222
Posted By sulti
You could do a little trick, something like: ...
You could do a little trick, something like:

~$ months=( Jan Feb Mar Apr May Jun )
~$ input=Feb
~$ for i in ${months[@]}; do echo $i; done | grep -c $input
1
~$ input=other
~$ for i in...
2,642
Posted By sulti
Ok, so You have to set output terminal different....
Ok, so You have to set output terminal different. Try this:
set terminal png # gnuplot recommends setting terminal before output
set output "output.png" # The output filename; to be set...
2,642
Posted By sulti
That's weird... Which system and what version of...
That's weird... Which system and what version of gnuplot are You using? Are You working on Your local computer or somewhere remote? How did You install gnuplot - repositories or compiling on Your...
2,067
Posted By sulti
Could be done with one sed :) who -ms | sed...
Could be done with one sed :)
who -ms | sed "s/^\([^ ]*\) .*(\(.*\))/\1@\2/g"
2,642
Posted By sulti
Very good samples and tutorials are here: ...
Very good samples and tutorials are here:
gnuplot tips (not so Frequently Asked Questions) (http://t16web.lanl.gov/Kawano/gnuplot/index-e.html)
Basic plotting is really simple:
gnuplot> set...
2,417
Posted By sulti
echo -e "something\tsomethinelse"
echo -e "something\tsomethinelse"
6,382
Posted By sulti
Provide some more information, like full listing...
Provide some more information, like full listing of what You are trying to delete (ls -al), Your account information (whoami), the command You're executing and exact error that occurs.
2,699
Posted By sulti
You mean sth like that? : sed -n -e...
You mean sth like that? :
sed -n -e '/^[a-z0-9]\{3\}$/p' test
or even:
sed -n -e '/^.\{3\}$/p' test
1,109
Posted By sulti
Should work: awk -v FS="%" '$1>90 {print}'...
Should work:
awk -v FS="%" '$1>90 {print}' disk_space.log
12,103
Posted By sulti
Actually it will work only if dir2 IS empty :) ...
Actually it will work only if dir2 IS empty :)
But when there are some files in it, it simply won't work...
So for now, I don't have any solution better than:
rm -rf /path/to/dir2 && mv...
12,103
Posted By sulti
I think, that You're looking for: mv -T...
I think, that You're looking for:
mv -T /path/to/dir1 /path/to/dir2
with -T target directory is treated as file - so it will be overwritten.
3,379
Posted By sulti
Ubuntu will do, but I've just switched to regular...
Ubuntu will do, but I've just switched to regular desktop with 'command-line install' option and just added xorg and openbox.
Ghash, which I used, was probably working on gstreamer, and as a...
3,379
Posted By sulti
Thanks. I think I'll probably stick to it. ...
Thanks.
I think I'll probably stick to it.

But for now I found some new issues:
- gnash is pretty slow. Adobe's flashplayer is much more efficient.
- without any window manager it's hard to...
3,379
Posted By sulti
Small linux distro for displaying advertisements/banners
Hi guys (& ladies) :)
I'm looking for some good linux distribution to use on my new project.
The project looks like this:
- tiny computer (ethernet, D-sub, usb, etc),
- big-screen monitor (min...
1,391
Posted By sulti
Try something like this: sed "/\\\\$/ { N;...
Try something like this:
sed "/\\\\$/ { N; s/\\\\\n/ /}" filename
1,793
Posted By sulti
What shell are You working on?
What shell are You working on?
1,793
Posted By sulti
dirs=("`cat file_with_dirs`") for dir in...
dirs=("`cat file_with_dirs`")
for dir in ${dirs}; do
echo $dir
....
done
2,079
Posted By sulti
alias rm='rm -i' Add it to Your /etc/profile
alias rm='rm -i'
Add it to Your /etc/profile
2,042
Posted By sulti
Ok, this gives me another idea. Instead of...
Ok, this gives me another idea. Instead of counting lines I could use NR:
for i in $(seq 2 201); do
awk -v c=$i 'NR>1 {s+=$c}; END {printf ("%f ", s/(NR-1))}' data.txt
done
echo
4,624
Posted By sulti
Same error? Because what You did try before could...
Same error? Because what You did try before could not work - You didn't close "s" command.
sed in ksh works pretty normal...
$ ksh
$ echo "1 2 3" | sed "s/2/\nhoi/"
1
hoi 3
4,624
Posted By sulti
sed "s/ERROR/\nhoi/" file will it...
sed "s/ERROR/\nhoi/" file
will it work?
2,042
Posted By sulti
I have to disagree :) $ wc -l test 4 test $...
I have to disagree :)
$ wc -l test
4 test
$ cat test | wc -l
4
That's why I used cat.
$ a=`wc -l test`
$ [ $a -gt 0 ] && echo Works
bash: [: Too many arguments

edit:
Ok, I noticed that wc...
2,042
Posted By sulti
Sorry, my bad :) didn't drink my morning coffee...
Sorry, my bad :) didn't drink my morning coffee ;)
I meant
lines=`cat data.txt | wc -l`
but then I've added simplier solution.
2,042
Posted By sulti
In awk: lines=`cat data.txt | wc -l` ...
In awk:

lines=`cat data.txt | wc -l` #corrected, thanks to itkamaraj
lines=$((lines-1))
for i in $(seq 2 201); do
awk -v c=$i -v l=$lines 'NR>1 {s+=$c}; END {printf ("%f ", s/l)}' data.txt...
9,436
Posted By sulti
| cut -b-9 No need for delimiters if Youre...
| cut -b-9
No need for delimiters if Youre writing bytes (chars).
Showing results 1 to 25 of 64

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