10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I am trying to add a date variable to the end of each line. This is what I have to start with
cat ${DATAPATH}/Participate_Stream${STREAMDATE}.dryak1.csv | grep ^',' | awk '{print $0}' >> ${DATAPATH}/badparticipant.csv
This is what I tried $DATE is a variable I have defined.
cat... (3 Replies)
Discussion started by: req62861
3 Replies
2. UNIX for Dummies Questions & Answers
I have a text file in which all records end with pipe character and newline, but a few do not have a pipe at the end.
Something like this
1|John|32|US|
2|Matt|35|UK
3|Rex|36|EU|
So in the above example the second line does not have a pipe at the end
My requirement is to append a... (5 Replies)
Discussion started by: abhilashnair
5 Replies
3. UNIX for Dummies Questions & Answers
Hi,
My requirement is to append a date in format DDMMYYYYHHMISS at the end of first line of file which is HEADER. I am trying command
sed -i '1s/.*/&<date_format>/' <file_name>
Where <date_format>=`date +%m%d%Y%H%M%S`
I am somehow misisng the right quotes ti get this added in above... (2 Replies)
Discussion started by: sanjaydubey2006
2 Replies
4. Shell Programming and Scripting
hi,
i m having a group of files starting with name 'Itemdelete<timestamp>' .
my requirment is to append a blank line at the end of files ,using unix in all the Itemdelete* files with a single unix command without using scripts.can any body put some light to this requiremnt.
regards
Angel (4 Replies)
Discussion started by: angel12345
4 Replies
5. UNIX for Dummies Questions & Answers
I am trying to sort data within a text document by the information at the end of each line. Please see below for an example:
<Profile_0 Name="Random name 0" Description="This is the description." Category="System" ProfileFlags.DWD="6" ABCD="{FF350E61-4FFF-4600-BFFF-3B27DD4BA746}"/>... (6 Replies)
Discussion started by: Davinator
6 Replies
6. Shell Programming and Scripting
A friend contacted me recently with an interesting question. We got something worked out, but I'm curious what answers you all can come up with.
Given a shell script (in bash) that processes a bunch of data and appends it to a file, how would you append the date, time, and a filename to the... (6 Replies)
Discussion started by: malcolmpdx
6 Replies
7. Shell Programming and Scripting
Hi Experts,
Am relatively new to shell programming so would appreciate some help in this regard.
I am looking at reading from a file, line by line, picking the first word of each line and appending it to the end of the line.
Any suggestions?
INPUT FILE -
3735051 :... (7 Replies)
Discussion started by: hj007
7 Replies
8. Shell Programming and Scripting
I have a bunch of files named publish.php within subdirs. I need to append a line at the end of each file. I thought I could do it with find and echo like this:
find . -name publish.php -exec echo "<? include('path/to/file.php'); ?>" >> '{}' \;
but that appends the line to a file named {}... (2 Replies)
Discussion started by: surroscape
2 Replies
9. Shell Programming and Scripting
Hi,
Am trying to write a shell script which will append a header and a footer to an existing file. Header will contain details like the current date while the footer will contain the no: of records listed in the file.
I know we can use the CAT command, but i have no clue abt the syntax to... (4 Replies)
Discussion started by: brainstormer
4 Replies
10. UNIX for Dummies Questions & Answers
how can I add data from command line to end of file? (3 Replies)
Discussion started by: bryan
3 Replies