Sponsored Content
Full Discussion: awk sum entire string
Top Forums Shell Programming and Scripting awk sum entire string Post 302771671 by balajesuri on Thursday 21st of February 2013 08:03:23 AM
Old 02-21-2013
Ah, yes! A silly miss.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sort entire line based on part of the string

hey gurus, my-build1-abc my-build10-abc my-build2-abc my-build22-abc my-build3-abc basically i want to numerically sort the entire lines based on the build number. I dont zero pad the numbers because thats "how it is" ;-) sort -n won't work because it starts from the beginning. ... (10 Replies)
Discussion started by: gurpal2000
10 Replies

2. UNIX for Dummies Questions & Answers

Search for a string and copy the entire line

Hello All, I am after the script or the command which can scan the entire file for a string $PART_ID and when found to extract/copy the corresponding $PART_ID value (e.g THIRE_PTY_SOFTWARE for the 1st occurance of $PART_ID in the attached file) to a file. Appreciate your help. Thanks in... (3 Replies)
Discussion started by: forumthreads
3 Replies

3. Shell Programming and Scripting

scripting/awk help : awk sum output is not comming in regular format. Pls advise.

Hi Experts, I am adding a column of numbers with awk , however not getting correct output: # awk '{sum+=$1} END {print sum}' datafile 2.15291e+06 How can I getthe output like : 2152910 Thank you.. # awk '{sum+=$1} END {print sum}' datafile 2.15079e+06 (3 Replies)
Discussion started by: rveri
3 Replies

4. Web Development

Replacing a string in an entire mysql Database

Hi, Can someone please tell me how I can replace every occurrence of a string with another string, in the entire mysql database? What this means is, i just dont want to operate table by table. I want to search the database and automatically replace the string /opt/cacti/scripts/ with... (1 Reply)
Discussion started by: SkySmart
1 Replies

5. Shell Programming and Scripting

Print only matched string instead of entire line

Hi, I have a file whose lines are something like Tchampionspsq^@~^@^^^A^@^@^@^A^A^Aÿð^@^@^@^@^@^@^@^@^@^@^A^@^@^@^@^?ð^@^@^@^@^@^@^@?ð^@^@^@^@^@^@pppsq^@~^@#@^@^@^@^@^@^Hw^H^@^@^@^K^@^@^@^@xp^At^@^FTtime2psq^@ ~^@^^^A^@^@^@^B^A I need to extract all words matching T*psq from the file. Thing is... (4 Replies)
Discussion started by: shekhar2010us
4 Replies

6. Shell Programming and Scripting

Print entire line only if certain fixed character matches the string

Hi All, I have a file testarun.txt contains the below lines and i want to print the lines if the character positions 7-8 matches 01. 201401011111 201401022222 201402013333 201402024444 201403015555 201403026666 201404017777 201404028888 201405019999 201405020000 I am trying the... (4 Replies)
Discussion started by: Arunprasad
4 Replies

7. Shell Programming and Scripting

Regular Expression - Switch Entire String

I would like to be able to use a regular expression to find and replace entire strings, but not replace if the string is a substring in a larger string. Example: $string = "ABC ABCDEF ABC ABCDEF ABC"; Something like - $string =~ s/ABC/XYZ/g; ->Desired: $string = "XYZ ABCDEF XYZ ABCDEF... (3 Replies)
Discussion started by: rjulich
3 Replies

8. Shell Programming and Scripting

Avoid printing entire line if string not found

so im searching the process table with: ps -ef | awk -F"./rello.java" '{ print substr($0, index($0,$2)) }' I only want it to print everything that's infront of the "./rello.java". That's because im basically getting the arguments that was passed to the rello.java script. this works. ... (2 Replies)
Discussion started by: SkySmart
2 Replies

9. UNIX for Beginners Questions & Answers

Search a string and display its location on the entire string and make a text file

I want to search a small string in a large string and find the locations of the string. For this I used grep "string" -ob <file name where the large string is stored>. Now this gives me the locations of that string. Now how do I store these locations in a text file. Please use CODE tags as... (7 Replies)
Discussion started by: ANKIT ROY
7 Replies

10. UNIX for Beginners Questions & Answers

Awk: count unique elements in a field and sum their occurence across the entire file

Hi, Sure it's an easy one, but it drives me insane. input ("|" separated): 1|A,B,C,A 2|A,D,D 3|A,B,B I would like to count the occurence of each capital letters in $2 across the entire file, knowing that duplicates in each record count as 1. I am trying to get this output... (5 Replies)
Discussion started by: beca123456
5 Replies
crash(8v)																 crash(8v)

Name
       crash - what happens when the system crashes

Description
       This section explains what happens when the system crashes and shows how to analyze crash dumps.

       When the system crashes voluntarily it prints a message on the console in the form:

	      panic: explanation

       The  system takes a dump on a mass storage peripheral device or the network, and then invokes an automatic reboot procedure as described in
       Unless there is some unexpected inconsistency in the state of the file systems due to hardware or software failure, the system then resumes
       multi-user operations.  If auto-reboot is disabled, the system halts at this point.

       The system has a large number of internal consistency checks; if one of these fails, it prints a short message indicating which one failed.

       The  most  common cause of system failures is hardware failure.	In all cases there is the possibility that hardware or software error pro-
       duced the message in some unexpected way.  These messages are the ones you are likely to encounter:

       IO err in push
       hard IO err in swap
	    The system encountered an error when trying to write to the paging device or an error in reading  critical	information  from  a  disk
	    drive.  Fix your disk if it is broken or unreliable.

       timeout table overflow
	    Due to the current data structure, running out of entries causes a crash.  If this happens, make the timeout table bigger.

       Exception Condition
	    An unexpected system error has occurred.  The exception types are as follows:

	    ---------------------------------------------------------------
	    Mnemonic   Description
	    ---------------------------------------------------------------
	    INT        External interrupt
	    MOD        TLB modification exception
	    TLBL       TLB miss exception (load or instruction fetch)
	    TLBS       TLB miss exception (store)
	    AdEL       Address error exception (load or instruction fetch)
	    AdES       Address error exception (store)
	    IBE        Bus error exception (for an instruction fetch)
	    DBE        Bus error exception (for a data load or store)
	    Sys        Sys call exception
	    Bp	       Breakpoint exception
	    CpU        Coprocessor unusable exception
	    Ovf        Arithmetic overflow exception
	    ---------------------------------------------------------------

       KSP not valid
	      This indicates either a problem in the system or failing hardware.

       init died
	      The  system initialization process has exited.  The only solution is the automatic reboot procedure described in Until this is done,
	      new users cannot log in.

       When the system crashes, it attempts to write an image of memory into the back end of the primary swap area.  After the system is rebooted,
       the  program  runs  and	preserves  a  copy  of	this core image and the current system in a specified directory for later access.  See for
       details.

       To analyze a dump, you should begin by running with the flag on the core dump.

See Also
       dbx(1), reboot(8), savecore(8)

								       RISC								 crash(8v)
All times are GMT -4. The time now is 06:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy