Sponsored Content
Top Forums Shell Programming and Scripting reading each line from a file Post 302114130 by ragha81 on Thursday 12th of April 2007 05:25:29 PM
Old 04-12-2007
thanks a lot for your timely help buddy.. ur code worked the way i wanted!
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

KSH: Reading a file line by line into multiple arrays

Hi - I have a file that contains data in this format:- #comment value1 value2 value3 #comment value4 value5 value6 value7 #comment value8 value9 I need to read value1, value2 and value3 into one array, value4 value5 value6 and value7 into another array and value8 and value9 into a 3rd... (2 Replies)
Discussion started by: sniper57
2 Replies

2. Shell Programming and Scripting

reading a file inside awk and processing line by line

Hi Sorry to multipost. I am opening the new thread because the earlier threads head was misleading to my current doubt. and i am stuck. list=`cat /u/Test/programs`; psg "ServTest" | awk -v listawk=$list '{ cmd_name=($5 ~ /^/)? $9:$8 for(pgmname in listawk) ... (6 Replies)
Discussion started by: Anteus
6 Replies

3. Shell Programming and Scripting

[Solved] Problem in reading a file line by line till it reaches a white line

So, I want to read line-by-line a text file with unknown number of files.... So: a=1 b=1 while ; do b=`sed -n '$ap' test` a=`expr $a + 1` $here do something with b etc done the problem is that sed does not seem to recognise the $a, even when trying sed -n ' $a p' So, I cannot read... (3 Replies)
Discussion started by: hakermania
3 Replies

4. UNIX for Dummies Questions & Answers

Parsing file, reading each line to variable, evaluating date/time stamp of each line

So, the beginning of my script will cat & grep a file with the output directed to a new file. The data I have in this file needs to be parsed, read and evaluated. Basically, I need to identify the latest date/time stamp and then calculate whether or not it is within 15 minutes of the current... (1 Reply)
Discussion started by: hynesward
1 Replies

5. Shell Programming and Scripting

How to start reading from the nth line till the last line of a file.

Hi, For my reuirement, I have to read a file from the 2nd line till the last line<EOF>. Say, I have a file as test.txt, which as a header record in the first line followed by records in rest of the lines. for i in `cat test.txt` { echo $i } While doing the above loop, I have read... (5 Replies)
Discussion started by: machomaddy
5 Replies

6. Shell Programming and Scripting

Reading text file, comparing a value in a line, and placing only part of the line in a variable?

I need some help. I would like to read in a text file. Take a variable such as ROW-D-01, compare it to what's in one line in the text file such as PROD/VM/ROW-D-01 and only input PROD/VM into a variable without the /ROW-D-01. Is this possible? any help is appreciated. (2 Replies)
Discussion started by: xChristopher
2 Replies

7. Shell Programming and Scripting

Comparison of fields then increment a counter reading line by line in a file

Hi, i have a scenario were i should compare a few fields from each line then increment a variable based on that. Example file 989878|8999|Y|0|Y|N|V 989878|8999|Y|0|N|N|V 989878|8999|Y|2344|Y|N|V i have 3 conditions to check and increment a variable on every line condition 1 if ( $3... (4 Replies)
Discussion started by: selvankj
4 Replies

8. Shell Programming and Scripting

Reading line by line from live log file using while loop and considering only those lines start from

Hi, I want to read a live log file line by line and considering those line which start from time stamp; Below code I am using, which read line but throws an exception when comparing line that does not contain error code tail -F /logs/COMMON-ERROR.log | while read myline; do... (2 Replies)
Discussion started by: ketanraut
2 Replies

9. UNIX for Beginners Questions & Answers

Reading a file line by line and print required lines based on pattern

Hi All, i want to write a shell script read below file line by line and want to exclude the lines which contains empty value for MOUNTPOINT field. i am using centos 7 Operating system. want to read below file. # cat /tmp/d5 NAME="/dev/sda" TYPE="disk" SIZE="60G" OWNER="root"... (4 Replies)
Discussion started by: balu1234
4 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 02:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy