Sponsored Content
Top Forums Shell Programming and Scripting Count occurances of a character in a file Post 302153230 by Shivdatta on Monday 24th of December 2007 03:21:30 AM
Old 12-24-2007
Thanks buddy,

Can you explain me where the actual conting of string happens..
I am unable to understand the script
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find occurances of a directory and count

I am writing my first shell script to do the following: Find all occurrences of a directory from the pwd Delete the directory (which is a hidden directory) Provide feedback w/ the number of directories deleted The problems I am having are two-fold: The user may not have the appropriate... (2 Replies)
Discussion started by: stringman
2 Replies

2. Shell Programming and Scripting

count the number chracters occurances in a line

Hi Could anybody tell me how to count the number of occurances of a character within a LINE. actually i have a single line with words seperated with '+' chracter e.g. abc+def+ghj+jkl+asd i want to separte the words above. Please provide the necessary logic in the form of a SHELL... (6 Replies)
Discussion started by: skyineyes
6 Replies

3. UNIX for Dummies Questions & Answers

Count occurances in a file

Hi, I have a fixed width file in the following format Sr.No A.No Name 1 2 PPP 3 4 PPP 5 6 TTT 7 8 OOO 9 10 OOO 11 12 OOO The 3rd column starts at position 10 and ends at 15. I want to count the number of occurances of each Name and output to a file Example in the... (2 Replies)
Discussion started by: samit_9999
2 Replies

4. Shell Programming and Scripting

Merging lines based on occurances of a particular character in a file

Hi, Is there any way to merge two lines based on specific occurance of a character in a file. I am having a flat file which contains multiple records. Each row in the file should contain specified number of delimiter. For a particular row , if the delimiter count is not matched with... (2 Replies)
Discussion started by: mohan_tuty
2 Replies

5. Shell Programming and Scripting

Count occurances of X Y Z in a file in 1 go.

Hi. I need to count multiple occurrences of X Y Z in a file in 1 go. At the moment I have the following scripts: ssh readonly@$ServerIP 'YEAR=xx;DAY=xx;MONTH=xx;LMONTH=xx;for i in 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 \ 16 17 18 19 20 21 22 23; do cat... (13 Replies)
Discussion started by: msullivan
13 Replies

6. Shell Programming and Scripting

How to count number of occurances of string in a file?

Gurus, Need little guidance. I have A.txt and B.txt file. B.txt file contains Unique strings. Sample content of B.txt file for which i cut the fourth column uniquely and output directed to B.txt file And A.txt file contains the above string as a fourth column which is last column. So A.txt... (7 Replies)
Discussion started by: Shirisha
7 Replies

7. Shell Programming and Scripting

Replace multiple occurances of same character with a single character.

Hi all, Greetings, I have the following scenario, The contents of main file are like : Unix|||||forum|||||||||||||||is||||||the||best so||||||be|||||on||||||||||||||||||||||||||||||||||||||||||||it And i need the output in the following form: Unix=forum=is=the=best so=be=on=it ... (3 Replies)
Discussion started by: dipanchandra
3 Replies

8. Shell Programming and Scripting

Replace first 3 occurances of a character in a file for each line

Hi all, I am very new to unix - ksh. I want to replace some characters in a file with some other, but only for first three occurances for each line. For eg: the first 3 occurances character ']' has to be replaced with ',' in each line. Please help. thanks Sreejith (1 Reply)
Discussion started by: rsreejithmenon
1 Replies

9. Shell Programming and Scripting

Count the occurances of numbers

I have a file as shown below. I need to count the unique occurrences of numbers in the first and second column only if the third column is <= 10. Otherwise print the corresponding numbers as zero. Thanks in advance!:) 58 80 40.74 76 80 9.78 76 80 8 12 6 9 30 28 8.23 45 12 ... (13 Replies)
Discussion started by: andreaalex
13 Replies

10. UNIX for Beginners Questions & Answers

Grep pattern file and count occurances

Guys I am trying grep to read from pattern file and count occurances of each word. input is firstplace secondplace secondpot patternfile is place first second i want the following. 1-count number of times keywords in patternfile occurs in begining of each line in input file. so... (12 Replies)
Discussion started by: ahfze
12 Replies
gaim(1)                                                            User Commands                                                           gaim(1)

NAME
gaim - Instant Messaging client SYNOPSIS
gaim [--acct] [--away [=message]] [--debug] [--file=file] [--help] [--login [=name]] [--loginwin] [-user=name] [--version] DESCRIPTION
The GAIM application is a GTK2-based Instant Messaging (IM) client designed primarily for use with AOL Instant Messenger (AIM). However, GAIM also supports most other popular IM protocols including ICQ, IRC, Jabber, MSN Messenger, and Yahoo!. OPTIONS
The following options are supported: --acct Launch the Account Editor, rather than the Login window, when GAIM starts. You can also use -a to specify this option. --away [=messageAutomatically sets your status to away when you sign on. You can optionally use the mesg parameter to set the away message. You can also use -w to specify this option. --debug Prints debug messages to stdout. The same debug messages are displayed in the Debug window. You can also use -d to specify this option. --file=file Uses file, instead of ~/.gaimrc, as the configuration file. You can also use -f to specify this option. --help Displays help text, then exits. You can also use -h to specify this option. --login [=name] Uses the default account, or the account specified by the name parameter, to automatically log in when GAIM starts. You can also use -l to specify this option. --loginwin Does not automatically log in when GAIM starts. Shows the Login window instead. You can also use -n to specify this option. -user=name Uses account name as the default. You can also use -u to specify this option. --version Displays the version information window. You can also use -v to specify this option. EXTENDED DESCRIPTION
Buddy List The Buddy List window is the main interface window. The buddy list is shown in the Online tab. To manage and edit the buddy list, use the Edit Buddies tab. To import a buddy list, choose File --> Import Buddy List. Online Tab The Online tab contains a list of your buddies who are online and allow you to be notified of their presence. If you select the appropriate preference, the icon to the left of each buddy name indicates the current state of the buddy. Double-click on a buddy name to open a new Conversation window. Right-click on a buddy name to display a popup menu that contains the following items: IM Opens a new Conversation window to the selected buddy. Alias Creates an alias for this buddy. Choose this menu item to display a new dialog where you can give this buddy an alternate name. The alternate name appears on the buddy list and in conversations. For example, if the buddy screen name is jsmith1281xx and the real name is John Q. Smith, you can create an alias to identify the buddy by the real name. Add Buddy Pounce A Buddy Pounce is a configurable automated action to be performed when the buddy's state changes. Choose this menu item to display the Buddy Pounce dialog. View Log GAIM can automatically log all activities. The GAIM logs are HTML files with a .log filename extension, located in the ~/.gaim/logs directory. Choose this menu item to view the log file with the GAIM internal log viewer. The menu also contains protocol-specific commands. The following commands are available when you use OSCAR, a popular AIM protocol recom- mended by developers: Get Info Retrieves and displays information about the buddy. This information is also known as a Profile. Get Away Msg If the status of the buddy is Away, retrieves and displays the buddy's Away Message. Get Capabilities Retrieves and displays the client capabilities of the buddy. If the appropriate preferences are selected, the Online tab contains the following buttons: IM Opens a new Conversation window to the selected buddy. If no buddy is selected, displays the New Message dialog. Info Retrieves and displays information about the selected buddy. If no buddy is selected, displays the Get User Info dialog. Chat Displays the Join Chat dialog, which prompts you to select which username to use and what chat group to join. Away Displays a menu of all available Away Messages. If you select an item, all online accounts use the selected item as the away message. Edit Buddies Tab Click on the Edit Buddies tab on the Buddy List window to display the main interface to edit and organize buddy lists. Click and drag to move buddies already in your buddy list to different groups, or to reorder buddies in the same group. You can add, rename, create an alias for, or delete buddies. You can also access some of the functions available in the Buddy List dialog. The Edit Buddies tab contains the following buttons: Add Displays the Add Buddy dialog, where you can add a buddy to your buddy list. Group Displays the Add Group dialog, where you can add a group to the current connection. The current connection is the connection with an item selected, or the topmost connection. Remove Removes the currently selected buddy or group. If no buddy or group is selected, no action is taken. Account Editor The Account Editor consists of a list of accounts and information about the accounts. Click Delete to delete the currently selected account. Click Add or Modify to display a Modify Account window, where you can add or alter account information. When you create a new account, you submit your screen name and password. You also choose your protocol. The AIM protocol, OSCAR, is always loaded, but other pro- tocols can be dynamically loaded and unloaded using Protocols Plugins (PRPLS). If you select the Remember Password option, the password is saved in the GAIM configuration file. If you select the Auto-Login option, the account automatically logs in when GAIM starts. Each protocol has specific options that can be found in the protocol-specific tab on the Modify Account window. Preferences All preferences take effect immediately. GAIM provides the following preferences: Interface Select this category to display several interface options. These include options for themes, fonts, message text, shortcuts, and the buddy list. Conversations Select this category to display several conversation options. These include options for tabs, IM windows, and chat windows. Proxy Select this category to display options that specify the proxy type and the proxy server configuration. Browser Select this category to display options that specify the browser type. Logging Select this category to display message-log options and system-log options. Sounds Select this category to display several sound options. These include options for sound methods and sound events. Away/Idle Select this category to display several away or idle options. These include options for auto-response and away mes- sages. Plugins Select this category to display a list of plugins. Conversations When you start a new conversation, a Conversation window is displayed. The conversation appears in the upper text box. You type your mes- sage in the lower text box. Buddy Chats If supported by your protocol, you can have Buddy Chats. To start a Buddy Chat, choose the appropriate File menu item, or click on the Chat button at the bottom of the Buddy List Online tab. Depending on your protocol, the following additional commands are available in chat: Whisper The text appears in the chat conversation, but is only visible to the sender and the receiver. Invite Invite other people to join the chat room. Ignore Ignore anything said by the specified person. Set Topic Set the topic of the chat room. This is usually a brief sentence describing the nature of the chat, an explanation of the name of the chat room. Away Messages Most protocols support away messages. You can set an informative message for others to see when you are away. Use the Tools --> Away sub- menu to add and remove away messages. o Choose New Away Message to create an away message and a title for that message. Choose Save or Save & Use to save the message. You can later refer to the message by the message title. o The Remove Away Message submenu contains the titles of saved away messages. Click on a message title to remove the away message asso- ciated with that title. o The remaining away menu items enable you to assign different away messages to different connections. o Choose Set All Away to set away all of the connections capable of the away state. Buddy Pounce A Buddy Pounce is an automated trigger that occurs when a buddy returns to a normal state from an away state. Choose Tools --> Buddy Pounce to display the New Buddy Pounce dialog. You can set a pounce to occur on any combination of the events listed, and any combination of actions can result. If you select the Save this pounce after activation option, the trigger remains until removed from the Remove Buddy Pounce menu. EXAMPLES
Example 1: Launching GAIM example% gaim EXIT STATUS
The following exit values are returned: 0 Application exited successfully >0 Application exited with failure FILES
The following files are used by this application: /usr/bin/gaim Executable for GAIM /usr/lib/gaim Location of GAIM plugins ~/.gaimrc GAIM configuration file ~/.gaim/logs/screenname.Log of all conversations with screenname ~/.gaim/blist.xml Buddy list ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability | | +-----------------------------+-----------------------------+ |Interface stability | | +-----------------------------+-----------------------------+ SEE ALSO
GAIM Manual NOTES
This man page was originally written by Dennis Ristuccia (dennis@dennisr.net). Updated by Sean Egan (bj91704@binghamton.edu) and Ben Tegarden (tegarden@uclink.berkeley.edu). Updated by Stephen Browne, Sun Microsystems Inc, 2003. SunOS 5.10 7 Oct 2003 gaim(1)
All times are GMT -4. The time now is 04:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy