Search Results

Search: Posts Made By: gch
5,913
Posted By gch
Thanks. nawk does it. I looked at timex on...
Thanks. nawk does it.
I looked at timex on nawk and command line. It is not really conclusive. Time varies wildly:
nawk
first time

real 0.58
user 0.19
sys 0.06...
5,913
Posted By gch
Your script gives syntax error on Solaris 10. I...
Your script gives syntax error on Solaris 10.
I don't have time to look into it right now.
5,913
Posted By gch
You are right. How big were your files? Only OS...
You are right. How big were your files? Only OS and system load would make difference. I want to try it on Solaris 10. In the case of large files, there would be a threshold at which awk could gain...
5,913
Posted By gch
ripat, this is interesting. Which system are you...
ripat, this is interesting. Which system are you using and which shell?
5,913
Posted By gch
cat test2From example he shows, he needed only...
cat test2From example he shows, he needed only third file with first column that was occurring only once in both files.
If one needed full line entry from both files this will do:

for i in `cat...
5,913
Posted By gch
Except syntax is simpler without awk. Mine was...
Except syntax is simpler without awk. Mine was also one line of code and faster. You can test that with command "time". As you noticed I did not have to explain syntax to user.
5,913
Posted By gch
awk is the least efficient program to use. If you...
awk is the least efficient program to use. If you look at awk binary code, it is half as big as ksh. Means you are loading this on top of shell you are using. On top of that it makes code hard to...
5,913
Posted By gch
You don't need to use awk or nawk. It is like...
You don't need to use awk or nawk. It is like killing mosquito with a sledge hammer.

cat file1 file2 | cut -f1 -d \| | sort | uniq -u
36,986
Posted By gch
This was interesting debate. The space is a...
This was interesting debate. The space is a powerful parser for all shells and has to be dealt with carefully.
This is why unix old-timers use _. Like in file_1 instead of "file 1". It saves you...
Forum: Google Chrome OS 08-05-2009
40,078
Posted By gch
You may have misperception what OS is. Most of...
You may have misperception what OS is. Most of people never access OS, just use provided utilities which are not really part of OS. OS is just a kernel and basic, supporting libraries. One can create...
Forum: Google Chrome OS 07-30-2009
40,078
Posted By gch
It is fair. They should do an OS from scratch. It...
It is fair. They should do an OS from scratch. It should be autonomic with extensive concurrency and fault tolerance. Who needs another version of 30 year old technology?
Forum: Solaris 07-30-2009
7,348
Posted By gch
This would violate security and defeat the...
This would violate security and defeat the advantage of zones.
You may look at this article that deals with some of your issues:
cr:zones [Cyber Renaissance]...
Forum: Solaris BigAdmin RSS 07-30-2009
1,080
Posted By gch
These are very simple scripts to automate zone...
These are very simple scripts to automate zone creation. They are attached to an article explaining some zone features:
cr:zones [Cyber Renaissance]...
5,287
Posted By gch
There is a problem with this construct....
There is a problem with this construct. Theoretically this should work all the time, but it does not. When I use Solaris sh, in some releases this works and in some it does not. This is why I did...
5,287
Posted By gch
This is how it should be done in this particular...
This is how it should be done in this particular case. Mine just illustrates, for less experienced, the fact that you can chain several commands before that while.
2,791
Posted By gch
Nice use of regular expressions.
Nice use of regular expressions.
5,287
Posted By gch
That construct is very powerful, and permits also...
That construct is very powerful, and permits also to rearrange order of strings in a file.
You could do:
....
do
echo $var3 $var2 $var1 >> newfile
done
....
2,791
Posted By gch
Sorry. I was doing too many things at the time. I...
Sorry. I was doing too many things at the time. I did not paste the correct line.
This is it:
cut -d \> -f4 filename | cut -d\< -f1
1,314
Posted By gch
Command test [] expects values, not commands, try...
Command test [] expects values, not commands, try this:

if [ `grep $value redirects.virgin-atlantic.com.conf > dred1` && $? == 0] ; then
5,287
Posted By gch
set `grep sdosanjh filename` echo $1 $2 $3 ...
set `grep sdosanjh filename`
echo $1 $2 $3
You need to provide test for failure otherwise you will get some gibberish.
these are called positional parameters and there are 9 of them. To have more...
6,568
Posted By gch
"cut" command maybe an alternative to awk way to...
"cut" command maybe an alternative to awk way to split any file with fixed or variable lenghth fields and definable field separator.
2,791
Posted By gch
There is overreliance on awk. There are cases in...
There is overreliance on awk. There are cases in which files are very large (log files) and using awk can literally take minutes to process such files.
The most efficient way is to use regular...
2,599
Posted By gch
Only comment is about passing variables to...
Only comment is about passing variables to children processes. you can pass them as arguments on the command line or use:
export variable
the child process will pick it up.
You need to keep in...
6,000
Posted By gch
It depends on system dependencies in your...
It depends on system dependencies in your scripts. There are parts of Solaris 10 that changed from Solaris 8. Any scripts dealing with services for example. In terms of syntax sh and ksh should not...
3,168
Posted By gch
Try this: server_status=`some command | grep...
Try this:

server_status=`some command | grep "Total error: 0"`

the symbol ` is the back quote. It is needed to redirect output of your command line to variable.
Showing results 1 to 25 of 26

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