10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I got the code below is one of the threads from this forum.
lineCount=$(iostat | wc -l)
numDevices=$(expr $lineCount - 7);
iostat $interval -x -t |
awk -v awkCpuFile=$cpuFile -v awkDeviceFile=$deviceFile -v awkNumDevices=$numDevices '
BEGIN {
print... (2 Replies)
Discussion started by: gopivallabha
2 Replies
2. UNIX for Advanced & Expert Users
Hi,
I want to search for a specific word in file and replace whole line with new text.
e.g.
1) I have file with below lines
APP=ABCD 12/12/2012
DB=DDB 01/01/2013
I need perl command which will check for APP=$VAL and replace whole line with APP=$NEWVAL $NEWDT
Simlarly need a... (2 Replies)
Discussion started by: mgpatil31
2 Replies
3. Shell Programming and Scripting
Hey there...
I am looking for a way to take the below contents ( small excerpt) of this file called PTR.csv
ptrrecord,0000002e0cc0.homeoffice.anfcorp.com,,10.11.191.62,,,False,62.191.11.10.in-addr.arpa,,302400,default... (6 Replies)
Discussion started by: richsark
6 Replies
4. Shell Programming and Scripting
Hi All
If i run the following command
nvidia-settings -V -q screens
I get this output
X Screen on sutton:0
sutton:0.0 (Quadro FX 4600)
Is connected to the following display devices:
DELL 2007FP (DFP-0: 0x00010000)
Eizo CG243W (DFP-1:... (1 Reply)
Discussion started by: ab52
1 Replies
5. UNIX for Dummies Questions & Answers
Hi All,
I need help on the following req.
I am getting output of a command as follows:
16377612 total memory
3802460 used memory
2827076 active memory
681948 inactive memory
12575152 free memory
477452 buffer memory
I want to compute used... (1 Reply)
Discussion started by: mailsara
1 Replies
6. Shell Programming and Scripting
I need to arrange output of SQL query into a comma separated format and I'm struggling with processing the output...
The output is something like this:
<Attribute1 name><x amount of white spaces><Atribute value>
<Attribute2 name><x amount of white spaces><Atribute value>
<Attribute3... (2 Replies)
Discussion started by: Juha
2 Replies
7. Shell Programming and Scripting
Hi All,
Can anyone help me please,
I have a word like below.
6,76
I want to read this word and check if it has "," (comma) and if yes then i want to replace it with "." (dot). That means i want to be changed to 6.76
If the word doesnot contain "," then its should not be changed.
Eg.
... (6 Replies)
Discussion started by: girish.raos
6 Replies
8. Shell Programming and Scripting
Hi all,
I'm attempting to parse through a .bin file word by word and perform a cksum on each word using perl. I'm new to perl so I dont exactly know how to get started. Any help would be greatly appreciated. Thanks! (1 Reply)
Discussion started by: TeamUSA
1 Replies
9. Shell Programming and Scripting
Hi ,
i need to parse the dir /opt/net/Pro/inv/do/disc_001812 to get only dsic001812 . how to do the same using shell script. (2 Replies)
Discussion started by: MuthuAlagappan
2 Replies
10. Shell Programming and Scripting
I'm attempting to create a Perl script that will:
Take the contents of the usernames.tmp file
(usernames.tmp is created from an awk one-liner ran against /etc/passwd)
Take one line at a time and pass it to the su command as a users name.
This should go on until there is no more name to... (10 Replies)
Discussion started by: bru
10 Replies