06-15-2017
BASH SCRIPT - Insert date into cells in cvs file
Hi, I'm looking to accomplish the following.
Insert current date into three places/cells within a cvs, every time the bash script is executed.
The cells are column A,B,C row 2. Row 1 is reserved for the headers.
The file name is always orders.csv. These three cells we always have an old date so they need to be updated when the script is ran.
Thank you
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
how do I write a script to checkout a file in cvs and cat the file into a file in my home directory
Commands are
cd /home/smr/sandbox
cvsroot
choose option 1
cvs co filename
cat filename > /home/smr/newfilename
Thank you! (4 Replies)
Discussion started by: llsmr777
4 Replies
2. Shell Programming and Scripting
I have tried
sed '/6/a text_to_inserted' file > newfile
but this inserts test_to_insert at random places in file and i want it in specific location, which is line 6.
can anyone help.... (6 Replies)
Discussion started by: phenom
6 Replies
3. UNIX for Dummies Questions & Answers
hi,
I need to create a bash shell script which picks up data from a text file and in the output file puts it into an html made table. I have to use sed and awk utilties to do this
the input text file will contain data in the format:
job name para1 para2 para3 para4 para4
1 ... (1 Reply)
Discussion started by: intern123
1 Replies
4. Shell Programming and Scripting
Hi Guys,
Can someone please help me on adding/inserting a variable to an sql scipt? Basically I want to generate data on monthly (i.e. July 01, 2011 to July 31, 2011) basis. As shown below..
set head off;
set linesize 300;
set pagesize 200;
spool /opt/oracle/temp/output.txt
select... (1 Reply)
Discussion started by: pinpe
1 Replies
5. Shell Programming and Scripting
Hi All,
I am very new to UNIX and I have tried this for a longtime now and unable to crack it....
There is a file that is continuously updating. I need to search for the string and find the date @ which it updated every day.....
eg:
String is "work started"
The log entry is as below:
... (1 Reply)
Discussion started by: Nithz
1 Replies
6. Shell Programming and Scripting
Hi I need a bash script that can search through a text file and when it finds 'FSS1206' I need to put a Letter F 100 spaces after the second instance of FSS1206
The format is the same throughout the file I need to repeat this on every time it finds the second 'FSS1206' in the file
I have... (0 Replies)
Discussion started by: firefox2k2
0 Replies
7. Shell Programming and Scripting
Hi not sure if this is possible but I need some help with a bash script, I have a text file and on the first line that starts with 7150230 I need it to put a 1 at position 79 and a 2 at position 88, this is where it gets complicated, on the next line it finds that starts with 7150230 I then need it... (8 Replies)
Discussion started by: firefox2k2
8 Replies
8. Shell Programming and Scripting
HI All,
I have a script in bash that i want that script will perform action
When the size of a particular folder exceeds the 80%.
Here is an example of script that result is exactly 80% :
#!/bin/bash
CHECK=$(df -h /var/log/syslog | grep '80%' | xargs echo | cut -d' ' -f5)
if ];... (1 Reply)
Discussion started by: Aviel.shani
1 Replies
9. Shell Programming and Scripting
Hi
The file contains 12 months of date and less than 12 months of data I want to display if date filed less than 12 months of data I want to insert a value amount 1 to amount4 0 and dates as well.
12345|Date|cntry|amount1|amount2|amount3|amoun4... (2 Replies)
Discussion started by: jagu
2 Replies
10. UNIX for Beginners Questions & Answers
hi all
i have a problem in the bash shell. i'd like insert in a variable a file for example :
i have a file datafine.log in this file there is :
17/JUN/2019
i want to insert the value of datafine.log in a variable.
Regards
Frncesco
edit by bakunin: please use CODE-tags for your data... (2 Replies)
Discussion started by: Francesco_IT
2 Replies
doctools::cvs(n) Documentation tools doctools::cvs(n)
__________________________________________________________________________________________________________________________________________________
NAME
doctools::cvs - Processing text in 'cvs log' format
SYNOPSIS
package require Tcl 8.2
package require textutil
package require doctools::cvs ?1?
::doctools::cvs::scanLog text evar cvar fvar
::doctools::cvs::toChangeLog evar cvar fvar
_________________________________________________________________
DESCRIPTION
This package provides Tcl commands for the processing and reformatting text in the format generated by the cvs log command.
The commands ::doctools::cvs::scanLog and ::doctools::cvs::toChangeLog are derived from code found on the Tcl'ers Wiki
[http://wiki.tcl.tk]. See the references at the end of the page.
API
::doctools::cvs::scanLog text evar cvar fvar
The command takes the text and parses it under the assumption that it contains a CVS log as generated by cvs log. The resulting
information is stored in the variables whose names were specified via evar, cvar, and fvar.
Already existing information in the referenced variables is preserved, allowing the caller to merge data from multiple logs into one
database.
varname evar (in)
Has to refer to a scalar variable. After the call this variable will contain a list of all the entries found in the log file.
An entry is identified through the combination of date and author, and can be split over multiple physical entries, one per
touched file.
It should be noted that the entries are listed in the same order as they were found in the text. This is not necessarily
sorted by date or author.
Each item in the list is a list containing two elements, the date of the entry, and its author, in this order. The date is
formatted as year/month/day.
varname cvar (in)
Has to refer to an array variable. Keys are strings containing the date and author of log entries, in this order, separated
by a comma.
The values are lists of comments made for the entry.
varname fvar (in)
Has to refer to an array variable. Keys are strings containing date, author of a log entry, and a comment for that entry, in
this order, separated by commas.
The values are lists of the files the entry is touching.
::doctools::cvs::toChangeLog evar cvar fvar
] The three arguments for this command are the same as the last three arguments of the command ::doctools::cvs::scanLog. This com-
mand however expects them to be filled with information about one or more logs. It takes this information and converts it into a
text in the format of a ChangeLog as accepted and generated by emacs. The constructed text is returned as the result of the command.
BUGS, IDEAS, FEEDBACK
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category doctools
of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for
either package and/or documentation.
SEE ALSO
http://wiki.tcl.tk/log2changelog
KEYWORDS
changelog, cvs, cvs log, emacs, log
CATEGORY
Documentation tools
COPYRIGHT
Copyright (c) 2003-2008 Andreas Kupries <andreas_kupries@users.sourceforge.net>
doctools 1 doctools::cvs(n)