10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I have a below syntax its working fine...
var12=$(ps -ef | grep apache | awk '{print $2,$4}')
Im getting expected output as below:
printf "%b\n" "${VAR12}"
dell 123
dell 456
dell 457
Now I wrote a while loop.. the output of VAR12 should be passed as input parameters to while loop and results... (5 Replies)
Discussion started by: sam@sam
5 Replies
2. UNIX for Dummies Questions & Answers
I am using this code:
for e in {1..14}
do
awk '{gsub(/^.*GGGGGG|TTTTT.*$/,"",$0)} 1' $e.1 > ${e}.2
done
However, in the second loop instead of GGGGGG|TTTTT, I should use AAAAAA|CCCCCC.
For third loop CCAAAA|CCCCAA, so on and so forth. Is there any way to accomplish this without writing... (20 Replies)
Discussion started by: Xterra
20 Replies
3. Solaris
I'm having a little trouble understanding the output I'm seeing from kstat for the "net" class. I'm seeing a lot of entries with "mac" as the name, like this.
module: bge instance: 3
name: mac class: net
... (3 Replies)
Discussion started by: Midcain
3 Replies
4. Shell Programming and Scripting
I have tried everything I can think of to get sed to change line N of a file to the contents of a variable. I have Googled the Internet, and I find lots of people telling how to use variables with the "Substitute" command, but no one telling how to use variables with the "Change" command.
I... (4 Replies)
Discussion started by: Mr.Lauren
4 Replies
5. Shell Programming and Scripting
I want to instert Category:XXXXX into the 2. line
something like this should work, but I have somewhere the wrong sytanx. something with the linebreak goes wrong:
sed "2i\\${n}Category:$cat\n"
Sample:
Titel Blahh Blahh abllk sdhsd sjdhf
Blahh Blah Blahh
Blahh
Should look like... (2 Replies)
Discussion started by: lowmaster
2 Replies
6. Solaris
I have a server on Solaris 8 who had a sudden reboot once and now the messages log is filled with these errors:
Mar 23 02:14:42 srt-hlr-b unix: NOTICE: kstat_create('unix', 0, 'icmp_minor_1'): cannot create kstat before kstat_init()
Mar 23 02:14:42 srt-hlr-b unix: NOTICE: kstat_create('vmem',... (10 Replies)
Discussion started by: StarSol
10 Replies
7. Solaris
We used kstat on netra240/440 to check if the link is full duplex. So we do something like:
bash-3.00# kstat -pc net bge:1::/'link_duplex'/ | cut -f2
2
The output 2 indicates the link is full duplex. This kind of check worked all right for Netra 240/440 systems.
However, the nxge... (2 Replies)
Discussion started by: illcar
2 Replies
8. Shell Programming and Scripting
hi all,
i'm looking for a bash or tcsh script that will clone an empty dir tree 'over' another tree ...
specifically, i'd like to:
(1) specify a src directory
(2) list the directory tree/hiearchy beneath that src dir, w/o files -- just the dirs
(3) clone that same, empty dir hierarchy to... (2 Replies)
Discussion started by: OpenMacNews
2 Replies
9. Shell Programming and Scripting
Can I use search & replace in any variable?
Suppose I have one variable named var1 which holds value "abcabc" I need to search 'a' in var1 and want to replace with 'x' like 'xbcxbc'. Is it possible? Can you provide me an example?
Malay (3 Replies)
Discussion started by: malaymaru
3 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I am looking for a cpu usage data (%usr, %iowait, %idle, %kernel) using kstat. The output of kstat is below. How do I interpret those numeric values? In other words, how do I calculate the percentage value using the values below?
Thanks a lot!
Ozvena
module: cpu_stat ... (4 Replies)
Discussion started by: ozvena
4 Replies