Sponsored Content
Top Forums Shell Programming and Scripting sed newbie scripting assistance Post 302685889 by mthespian on Monday 13th of August 2012 01:41:18 PM
Old 08-13-2012
Won't this awk solution have a problem with very large files? To my eye, it looks like it's trying to load the whole thing into memory first...

If that's the case, couldn't it be problematic since the log files have already gotten to 500 MB in a half day? (partly why I'm looking to summarise duplicate content)

Personally I was leaning more toward sed just because it's a lighterweight install for the pc platform and can hopefully be invoked with a single commandline (aiming to shell out of notepad++, modify the buffer, and reload)

Last edited by mthespian; 08-13-2012 at 02:42 PM.. Reason: adding info
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Scripting Newbie

Seems simple but I am having difficulty with this one: I am trying to write a single command line argument (which will be a path) - the program should print out the owner of the path. I can not get anything I write to run. Please help. (5 Replies)
Discussion started by: Kymmers7
5 Replies

2. Shell Programming and Scripting

scripting newbie... some help please?

hi all, i am just getting in to bash scripting, so don't be too harsh... i've created this little backup script, and it's just awfull... ugly, doesn't work like I want it to, the works. anyways, i was hoping some of you might help me improve it and learn a little in the process. what i... (13 Replies)
Discussion started by: jmd9qs
13 Replies

3. Shell Programming and Scripting

Scripting neophyte needs file manipulation assistance

I need to write two shell scripts for an rsync backup solution. The first script will copy all backed up files into a folder named after the original folder, plus a date stamp (so e.g. if the original folder name is 'foo' and is backed up on the 10th of September, then the backup folder will be... (0 Replies)
Discussion started by: LambdaCalculus
0 Replies

4. Shell Programming and Scripting

Assistance in Perl scripting

PFA file "color.txt". Note : There is no newline character in the file. I have manually inserted the newline char to make it easy to understand. I am expecting out in the form as specified in second file "out.txt" I need a perl script to perform the task. Thanks in advance. (2 Replies)
Discussion started by: deo_kaustubh
2 Replies

5. Shell Programming and Scripting

Need assistance with sed

Hi All, I need your assistance, I would like to replace all lines beginning with the word "begin" with the below text: Device | IPMB0-A | IPMB0-B Board Address |Sent SentErr %Errr |Sent SentErr ... (9 Replies)
Discussion started by: Dendany83
9 Replies

6. UNIX for Advanced & Expert Users

Need assistance with sed

Hi All, I need your assistance, I would like to replace all lines beginning with the word "begin" with the below text: Device | IPMB0-A | IPMB0-B Board Address |Sent SentErr %Errr |Sent SentErr ... (10 Replies)
Discussion started by: Dendany83
10 Replies

7. Shell Programming and Scripting

Using ii for irc chat - scripting assistance?

I am using ii for irc on my pogoplug... hxxp://hg.suckless.org/ii/file/d163c8917af7/FAQ If you look at the bottom of there, it states 31 What other fancy stuff can I do with ii? 32 ---------------------------------------- 33 It is very easy to write irc bots in ii: 34... (3 Replies)
Discussion started by: spartan2006
3 Replies

8. Shell Programming and Scripting

Dhcp.config file scripting assistance

Hello everyone! I am brand new at this forum thing and wanted to thank all of you for your time and help in advance for helping me troubleshoot my issue. I am fairly new to shell scripting and scoured the entire internet to find a solution for my issue to no avail and hope you're able to help. ... (2 Replies)
Discussion started by: sedrocks
2 Replies

9. Shell Programming and Scripting

Noob to scripting needs some assistance

Hello, I am in a Unix class and have been out of town. I have been tasked to generate a couple of scripts and ahve never done it before. I have a virtual machine running Ubuntu. The task is below Prompt the system administrator for all valid input parameters Generate a menu to ask which... (1 Reply)
Discussion started by: jkeeton81
1 Replies

10. Shell Programming and Scripting

sed assistance

Hello everyone. I am trying to replace sprintf(buffer, "{\"id\":1,\"method\":\"mining.update_block\",\"params\":}\n", coinid, blockhash); with sprintf(buffer, "{\"id\":1,\"method\":\"mining.update_block\",\"params\":}\n", coinid, blockhash); this is the code I was trying but is... (9 Replies)
Discussion started by: crombiecrunch
9 Replies
vxcmdlog(1M)															      vxcmdlog(1M)

NAME
vxcmdlog - administer command logging SYNOPSIS
vxcmdlog [-H] [-l] [-m {on|off}] [-n number] [-s size] DESCRIPTION
The vxcmdlog command is used to administer command logging in Veritas Volume Manager (VxVM). This feature can be used to record all VxVM commands that are issued, and can be used in conjunction with the transaction logging feature (see vxtranslog(1M)). When the current log file reaches a maximum size, it is renamed as a historic log file, and a new current log file is created. A limited number of historic log files is preserved to avoid filling up the file system. Each log file contains a header that records the host name, host ID, and the date and time that the log was created. See the EXAMPLES sec- tion below for a description of the entries that are recorded in a log file. OPTIONS
-H Displays detailed help about the usage of the command. -l Lists current settings for command logging. This shows whether command logging is enabled, the maximum number of historic log files, and the maximum log file size. -m {on|off} Turns command logging on or off. By default, command logging is turned on. -n number Sets the maximum number of historic log files to maintain. The default number is 5. If number is set to no_limit, there is no limit on the number of historic log files that are created. -s size Sets the maximum size to which a command log can grow. (Note that this setting has no effect on existing historic log files.) The suffix modifiers k, m, and g may be used express sizes in kilobytes, megabytes and gigabytes respectively. If no suffix is specified, the default units are kilobytes. If size is set to no_limit, there is no limit on the size of the log file. The size of the command log is checked after an entry has been written so the actual size may be slightly larger than that speci- fied. When the log reaches the specified size, the current command log file, cmdlog, is renamed as the next available historic log file, cmdlog.number, where number is an integer from 1 up to the maximum number of historic log files that is currently defined. If the maximum number of historic log files has been reached, the oldest historic log file is removed, and the current log file is renamed as that file. The default maximum size of the command log file is 1m(1MB). EXAMPLES
Turn on command logging: vxcmdlog -m on Set the maximum command log file size to 512KB: vxcmdlog -s 512k Set the maximum number of historic command log files to 10: vxcmdlog -n 10 The following are sample entries from a command log file: /usr/sbin/vxdctl mode /usr/sbin/vxdisk -q -o alldgs list /etc/vx/diag.d/vxprivutil dumpconfig /dev/vx/rdmp/Disk_4s2 /usr/sbin/vxdisk list SENA0_1 Each entry usually contains a client ID that identifies the command connection to the vxconfigd daemon, the process ID of the command, a time stamp, and the command that was used together with its arguments. If the client ID is 0, as in the third entry shown here, this means that the command did not open a connection to vxconfigd. Note: The client ID is the same as that recorded for the corresponding transactions in the transactions log. FILES
/etc/vx/log Symbolic link to the log directory. This can be redefined if necessary. /etc/vx/log/cmdlog Current command log. /etc/vx/log/cmdlog.number Historic command logs. NOTES
If vxcmdlog records the invocation of a vxmake command that reads object definitions from a description file, vxcmdlog additionally records the contents of the description file. Most command scripts are not logged, but the command binaries that they call are logged. Exceptions are the vxdisksetup, vxinstall, and vxdiskunsetup scripts, which are logged. SEE ALSO
vxtranslog(1M) Veritas Volume Manager Troubleshooting Guide VxVM 5.0.31.1 24 Mar 2008 vxcmdlog(1M)
All times are GMT -4. The time now is 12:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy