Search Results

Search: Posts Made By: edehont
1,391
Posted By edehont
'/' is a restricted character. You can not use it...
'/' is a restricted character. You can not use it in a directory name.

Script around it and use something like '=s' for slash it that's unique in your situation. Let your script translate it back...
6,127
Posted By edehont
Perhaps something like this? { echo "Number...
Perhaps something like this?

{ echo "Number of files in the directory = `find . -maxdepth 1 -type f|wc -l`";find . -maxdepth 1 -type f -printf "%f\n"|cat -n ;} >../pathtodir/count.txt
1,391
Posted By edehont
As an alternative, with mkdir -p stp/wsUAL you...
As an alternative, with mkdir -p stp/wsUAL you create both directories at once. Is that an option?
4,139
Posted By edehont
@alister: My bad! Greedyness has indeed nothing...
@alister: My bad! Greedyness has indeed nothing to do with this problem. Thanks for putting that right.
4,139
Posted By edehont
Regexes are greedy, so only on the last line...
Regexes are greedy, so only on the last line matches the class of no double quotes and no newlines.
Try options -P or -z of grep to match across newlines.

B.t.w.: this is an area were the regex...
1,347
Posted By edehont
Yeah, I had the same problem just days ago...
Yeah, I had the same problem just days ago...
1,347
Posted By edehont
Ftp uses ASCII-transfer mode by default. A zipped...
Ftp uses ASCII-transfer mode by default. A zipped tar is binary.
Issue the command 'binary' to tell ftp to treat your upload as such.
2,648
Posted By edehont
The man page advises to use a count and a...
The man page advises to use a count and a deadline to check wether a host is alive.

Something like this will be more reliable:
$ ping -c 10 -w 10 myhost >/dev/null && echo "myhost is alive"...
2,236
Posted By edehont
$ echo $OUTPUT|awk -F, '{sub(/.*\//,"",$8);print...
$ echo $OUTPUT|awk -F, '{sub(/.*\//,"",$8);print $1"*****"$6"*****"$8}'
name_of_system*****ip_address*****NEED
1,360
Posted By edehont
When using single quotes, the shell takes your *...
When using single quotes, the shell takes your * as a literal value.

So, don't use single quotes. (In this case.)

Next, use cat to conCATenate files:

cat...
2,593
Posted By edehont
A while ago I wrote a Perl-script to do this. It...
A while ago I wrote a Perl-script to do this. It also puts all pictures in a random order.

Perhaps one could add a routine to update ~/.gconf/desktop/gnome/background/%gconf to have it point to...
867
Posted By edehont
I must agree: your question is rather vague. ...
I must agree: your question is rather vague.

However, is this what you're looking for?

$ awk '/DEF/{DEF=NR} /EFG/{EFG=NR} END{print "Last DEF is on line "DEF"\nLast EFG is on line "EFG}'...
1,793
Posted By edehont
The options to your sendmail command are wrong! ...
The options to your sendmail command are wrong!

Send some emails to yourself using cat <file>|sendmail <options> until you understand how it works.

Do you even have the command 'sendmail' on...
3,222
Posted By edehont
I'm new on this forum (my second day!), but this...
I'm new on this forum (my second day!), but this was already the second time I gave a solution to a problem Ahamed already solved. I thought it was time to point out I was not competing or anything....
4,057
Posted By edehont
You do a read a in your shell. Then you use $a in...
You do a read a in your shell. Then you use $a in awk, but that won't work because awk knows nothing about shell variables.

When you invoke awk you can however pass variables to it:

awk -v a=$a...
3,222
Posted By edehont
Why not split the whole file in one go? With this...
Why not split the whole file in one go? With this line of awk, you split the whole file into files with filenames like 00000000-00001000.exp for the record range below 1000, 00001000-00002000.exp for...
1,826
Posted By edehont
To be honest, I've hardly ever worked with bc...
To be honest, I've hardly ever worked with bc before. I just took a glimpse at the man page and came up with this idea. Since we are mixing strings and expressions, the print command seemed the way...
1,826
Posted By edehont
If you want (slash need) to stick to sed and bc,...
If you want (slash need) to stick to sed and bc, try this:

sed 's/^\(.*:\)\([0-9]*\),*\([0-9]*\):\([0-9]*\),\([0-9]*\)/print \"\1\2,\3:\4,\5:\",\4\.\5-\2\.\3,\"\n\"/' beurs.txt|bc|sed...
Showing results 1 to 18 of 18

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