02-18-2011
What are my alternatives? Examples?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Does anyone know how to insert text at the top and bottom of a file using sed? (12 Replies)
Discussion started by: MBGPS
12 Replies
2. Shell Programming and Scripting
Dear Folks :),
I am new to UNIX scripting and I do not know how can I insert some text in the first column of a UNIX text file at command promtp.
I can do this in vi editor by using this command :g/^/s//BBB_
e,g I have a file named as Test.dat and it containins below text:
michal... (4 Replies)
Discussion started by: Muhammad Afzal
4 Replies
3. Shell Programming and Scripting
Hi all,
I need to insert new text and change existing text in a file. For that I used the below line in the command line and got the expected output.
sed '$a\
hi...
' shell > shell1
But I face problem when using the same in script. It is throwing the error as,
sed: command garbled:... (4 Replies)
Discussion started by: iamgeethuj
4 Replies
4. Shell Programming and Scripting
I know that
sed -n '12p' file
will print line 12 but how might I insert text to a specified line?
thanks (2 Replies)
Discussion started by: action_owl
2 Replies
5. Shell Programming and Scripting
sed '1r file.txt' <source.txt >desti.txt
This example will insert 'file.txt' between line 1 and 2 of source.txt.
sed '0r file.txt' <source.txt >desti.txt
gives an error message.
Does anyone know how 'sed' can insert 'file.txt' before the first line of source.txt? (18 Replies)
Discussion started by: psve
18 Replies
6. Shell Programming and Scripting
Hi All,
I have a file.txt which seems like having three lines.
wc -l file.txt
3 file.txt
In fact, once it is open in text editor, this file has four lines where the last line is empty. how can i delete this last empty line of the file.txt? I tried the codes below so far but they... (6 Replies)
Discussion started by: senayasma
6 Replies
7. Shell Programming and Scripting
I have an awk script to extract data from several files and create output in the following format as a csv file:
xxxx 01/04/12 0001 0
When data is present, I have a file. When no data is available in the input files, I would still like to create a file that looks like this:
xxxx... (1 Reply)
Discussion started by: banjo25
1 Replies
8. Shell Programming and Scripting
Hi,
I want to insert the text 'Unknown' in 2 specific columns in a csv file (actually | separated) if the column is blank. Its always the same columns.
I have tried using sed: sed "s/||/|Unknown|/g"
but there are occasion where other fields are blank and they need to be left blank. This... (4 Replies)
Discussion started by: ksexton
4 Replies
9. Shell Programming and Scripting
I have a test file that I want to read and insert only certain lines into the
the table based on a filter.
1. Rread the log file 12 Hours back Getdate() -12 Hours
2. Extract the following information on for lines that say "DUMP is
complete"
A. Date
B. Database Name
C.... (2 Replies)
Discussion started by: JolietJake
2 Replies
10. UNIX for Beginners Questions & Answers
Hi All,
I am using UNix Sun OS sun4u sparc SUNW,SPARC-Enterprise
My intention is to insert a line of text after 13th line of every file inside a particular directory.
While trying to do it for a single file , i am using sed
sed '3 i this is the 4th line' filename
sed: command garbled: 3... (5 Replies)
Discussion started by: gotamp
5 Replies
LEARN ABOUT DEBIAN
smptetime
SMPTETime(3) libltcsmpte SMPTETime(3)
NAME
SMPTETime -
Human readable time representation.
SYNOPSIS
#include <ltcsmpte.h>
Data Fields
char timezone [6]
unsigned char years
unsigned char months
unsigned char days
unsigned char hours
unsigned char mins
unsigned char secs
unsigned char frame
Detailed Description
Human readable time representation.
Examples:
tests/decoder.c, and tests/encoder.c.
Definition at line 179 of file ltcsmpte.h.
Field Documentation
unsigned char SMPTETime::days
Examples:
tests/decoder.c, and tests/encoder.c.
Definition at line 184 of file ltcsmpte.h.
unsigned char SMPTETime::frame
Examples:
tests/decoder.c, and tests/encoder.c.
Definition at line 189 of file ltcsmpte.h.
unsigned char SMPTETime::hours
Examples:
tests/decoder.c, and tests/encoder.c.
Definition at line 186 of file ltcsmpte.h.
unsigned char SMPTETime::mins
Examples:
tests/decoder.c, and tests/encoder.c.
Definition at line 187 of file ltcsmpte.h.
unsigned char SMPTETime::months
Examples:
tests/decoder.c, and tests/encoder.c.
Definition at line 183 of file ltcsmpte.h.
unsigned char SMPTETime::secs
Examples:
tests/decoder.c, and tests/encoder.c.
Definition at line 188 of file ltcsmpte.h.
char SMPTETime::timezone[6]
Examples:
tests/decoder.c, and tests/encoder.c.
Definition at line 181 of file ltcsmpte.h.
unsigned char SMPTETime::years
Examples:
tests/decoder.c, and tests/encoder.c.
Definition at line 182 of file ltcsmpte.h.
Author
Generated automatically by Doxygen for libltcsmpte from the source code.
Version 0.4.4 Fri Apr 27 2012 SMPTETime(3)