Sponsored Content
Top Forums Shell Programming and Scripting Curious question? How to put a string into two columns. Post 302368975 by liuzhencc on Friday 6th of November 2009 06:48:05 AM
Old 11-06-2009
Quote:
Originally Posted by steadyonabix
Does each log only ever contain 2 lines?
Not really. some did, but some logs have nothing follow it. Is this question clear? I just want to put the two numbers which behind the log in the same row.

---------- Post updated at 07:48 PM ---------- Previous update was at 07:42 PM ----------

Excellent script! It works well. But could you please help me to improve a little bit? If there are no numbers following the *log, we should put an empty line in the output. See the modified questing. Thank you very much! ....zhen
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

put a string before a searched string

hi all! i have a working that looks like this... file1 MALE JOHN MALE ANJO FEMALE ANNE MALE JAMES FEMALE HONEY FEMALE IZA what i want to do is insert "M" when the first string is "MALE" and insert "F" when the first string is "FEMALE". file1 M MALE ... (10 Replies)
Discussion started by: kingpeejay
10 Replies

2. Shell Programming and Scripting

Curious cron job question

Wow that was annoying, I wrote a huge long entire post out, clicked submit and the damn thing lost my entire post. Ok, here's what I am needing to do. Have a cron job run every six days at a random minute and hour ONLY ONCE on that day. Would this work? */30 */3 * * */6 command ... (3 Replies)
Discussion started by: Ashberry
3 Replies

3. Shell Programming and Scripting

How to compare particular string, if it is equal put into a new file

Hi, I have a file (sample.txt) this file contains below text. ./au ./11.5.0 ./11.5.0/admin ./11.5.0/admin/driver ./po ./11.5.0 ./11.5.0/admin ./11.5.0/admin/driver ./xxsbx/11.5.0/java/src ./xxsbx/11.5.0/lib ./xxsel ./xxsel/11.5.0 ./xxsel/11.5.0/admin ./zfa ./zfa/11.5.0... (2 Replies)
Discussion started by: gagan4599
2 Replies

4. Shell Programming and Scripting

Extract columns from a file if the name dont exist put blank

Hi, I am very new to Unix script. Suppose i have a file with column header: NAME1 NAME2 Address Tel And I always need to make a file with column header: ID NAME1 NAME2 EMail Address Tel For the columns that do not exist in the file, I would still like to make a column with blank. ... (11 Replies)
Discussion started by: nightrider
11 Replies

5. Shell Programming and Scripting

put string end of the line

I've a problem to put .h end of the line..below my input file fg_a bb fg_b bb fg_c bb fg_d aa fg_f ee and i want the output file as below fg_a.h bb fg_b.h bb fg_c.h bb fg_d.h (6 Replies)
Discussion started by: zulabc
6 Replies

6. Shell Programming and Scripting

How to use sed to put string end of line?

I have several file as below, and i want to put .txt to specific text contain ^main=EXE^cmd=run script /usr/prog/bd_, file1 7.9102 12.1528 16.3672 7.4002 ^main=EXE^cmd=run script /usr/prog/bd_123^" line 16.3672 7.3134 17.8711 6.0981 file 2 7.9102 12.1528 16.3672 7.4002 ... (8 Replies)
Discussion started by: zulabc
8 Replies

7. Red Hat

Dummy Question, put a script on startup fails

Hi all, im pretty new to unit/redhat 6.2 I am trying to load a script upon startup of my redhat 6.2 (instance in ec2 AWS if someone cares) I want everytime when instance starts (after stop/reboot) a script i build to launch. when i run the script ./scriptname the script runs and everything is... (4 Replies)
Discussion started by: hookedatwalla
4 Replies

8. Programming

How to put dot(.) in a string in C?

Hi all, Can anybody please tell me how can I put dot(.) in a string using C programming. for example -- I am having string "10111988" and I want to convert it as "10.11.1988" I will appriciate and thanks in advance.. (4 Replies)
Discussion started by: smartgupta
4 Replies

9. Shell Programming and Scripting

Put a string to the beginning of a file without a linefeed

Hello, I need to put the following string to the beginning of a file - but it should not create a newline at the end of the string. So, the file I have is a compressed one - with gzip. And I would like to add an ASCII-String to the beginning of the file. The string has a length of 69... (5 Replies)
Discussion started by: API
5 Replies

10. Shell Programming and Scripting

Printf or any other method to put long string of spec characters - passing passwords

Hello, I am looking for a method to use in my bash script which allows me to use long strings with all special characters. I have found that printf method could be helpful for me but unfortunately, when I trying root@machine:~# tevar=`printf "%s%c"... (2 Replies)
Discussion started by: elxa1
2 Replies
SEIVOT(1)						      General Commands Manual							 SEIVOT(1)

NAME
seivot - benchmark backup application (obnam) SYNOPSIS
seivot [--benchmark-fsck] [--config=FILE] [--description=TEXT] [--drop-caches] [--dump-config] [--dump-memory-profile=METHOD] [--dump-setting-names] [--encrypt-with=KEYID] [--file-size=SIZE] [--generate-manpage=TEMPLATE] [--generations=COUNT] [-h] [--help] [--incremental-data=SIZE] [--initial-data=SIZE] [--larch-branch=LARCH-BRANCH] [--list-config-files] [--log=FILE] [--log-keep=N] [--log-level=LEVEL] [--log-max=SIZE] [--log-mode=MODE] [--no-default-configs] [--obnam-branch=OBNAM-BRANCH] [--obnam-config=FILE] [--obnam-profile=NAMEPATTERN] [--output=FILE] [--profile-name=PROFILE-NAME] [--program=PROGRAM] [--sftp-delay=SFTP-DELAY] [--use-existing=DIR] [--use-sftp-repository] [--use-sftp-root] [--verify] [--version] [FILE]... DESCRIPTION
seivot benchmarks a backup application. It has been written primarily for obnam(1), but could be extended for other backup applications. seivot generates some live data using genbackupdata(1), and then runs the backup application. It then generates some more live data, and runs a second backup generation, etc. It stores the measurements in an output file. See seivots-summary(1) for a tool to show data from such files in a tabular fashion. (seivot does not itself show the tabular data, because one is rarely interested in the output from just one run, and instead wants to contrast it with other runs). OPTIONS
--benchmark-fsck benchmark fsck? --config=FILE add FILE to config files --description=TEXT free-form description of this backup run --drop-caches clear Linux kernel cache before running commands (will ask for sudo pasword --dump-config write out the entire current configuration --dump-memory-profile=METHOD make memory profiling dumps using METHOD, which is one of: none, simple, meliae, or heapy (default: simple) --dump-setting-names write out all names of settings and quit --encrypt-with=KEYID encrypt backups with KEYID --file-size=SIZE size of files to create --generate-manpage=TEMPLATE fill in manual page TEMPLATE --generations=COUNT total number of generations to measure (5) -h, --help show this help message and exit --incremental-data=SIZE add SIZE live data for additional generations (1024) --initial-data=SIZE size of initial live data (1024) --larch-branch=LARCH-BRANCH bzr branch from which to use larch (default is installed larch) --list-config-files list all possible config files --log=FILE write log entries to FILE (default is to not write log files at all); use "syslog" to log to system log, or "none" to disable log- ging --log-keep=N keep last N logs (10) --log-level=LEVEL log at LEVEL, one of debug, info, warning, error, critical, fatal (default: debug) --log-max=SIZE rotate logs larger than SIZE, zero for never (default: 0) --log-mode=MODE set permissions of new log files to MODE (octal; default 0600) --no-default-configs clear list of configuration files to read --obnam-branch=OBNAM-BRANCH bzr branch from which to run obnam (default is installed obnam) --obnam-config=FILE use FILE as an Obnam configuration file --obnam-profile=NAMEPATTERN store Python profiling output in files named after NAMEPATTERN (no profiling, unless set); %(foo)s in pattern gets filled in, where foo is op (for backup/restore/etc), gen, or order (cumulative/time) --output=FILE write output to FILE, instead of standard output --profile-name=PROFILE-NAME name of backup use-case profile name (for documentation purposes only) --program=PROGRAM program to benchmark (obnam) --sftp-delay=SFTP-DELAY add an artificial delay (in milliseconds) to all SFTP transfers --use-existing=DIR use exiting DIR for initial generation --use-sftp-repository access backup repository over the network via sftp --use-sftp-root access backup repository over the network via sftp --verify verify restored data --version show program's version number and exit EXAMPLE
To run a simple benchmark: seivot --initial-data=10G --incremental-data=1G SEE ALSO
seivots-summary(1), obnam(1). SEIVOT(1)
All times are GMT -4. The time now is 10:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy