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
mtp_libmtp_devicestorage_struct
LIBMTP_devicestorage_struct(3) libmtp LIBMTP_devicestorage_struct(3)
NAME
libmtp - LIBMTP_devicestorage_struct
SYNOPSIS
#include <libmtp.h>
Data Fields
uint32_t id
uint16_t StorageType
uint16_t FilesystemType
uint16_t AccessCapability
uint64_t MaxCapacity
uint64_t FreeSpaceInBytes
uint64_t FreeSpaceInObjects
char * StorageDescription
char * VolumeIdentifier
LIBMTP_devicestorage_t * next
LIBMTP_devicestorage_t * prev
Detailed Description
LIBMTP Device Storage structure
Examples:
folders.c, and sendtr.c.
Field Documentation
uint16_t LIBMTP_devicestorage_struct::AccessCapability
Access capability
Referenced by LIBMTP_Dump_Device_Info(), and LIBMTP_Get_Storage().
uint16_t LIBMTP_devicestorage_struct::FilesystemType
Filesystem type
Referenced by LIBMTP_Dump_Device_Info(), and LIBMTP_Get_Storage().
uint64_t LIBMTP_devicestorage_struct::FreeSpaceInBytes
Free space in bytes
Referenced by LIBMTP_Dump_Device_Info(), and LIBMTP_Get_Storage().
uint64_t LIBMTP_devicestorage_struct::FreeSpaceInObjects
Free space in objects
Referenced by LIBMTP_Dump_Device_Info(), and LIBMTP_Get_Storage().
uint32_t LIBMTP_devicestorage_struct::id
Unique ID for this storage
Examples:
folders.c, and sendtr.c.
Referenced by LIBMTP_Dump_Device_Info(), LIBMTP_Format_Storage(), and LIBMTP_Get_Storage().
uint64_t LIBMTP_devicestorage_struct::MaxCapacity
Maximum capability
Referenced by LIBMTP_Dump_Device_Info(), and LIBMTP_Get_Storage().
LIBMTP_devicestorage_t* LIBMTP_devicestorage_struct::next
Next storage, follow this link until NULL
Examples:
folders.c, and sendtr.c.
Referenced by LIBMTP_Dump_Device_Info(), and LIBMTP_Get_Storage().
LIBMTP_devicestorage_t* LIBMTP_devicestorage_struct::prev
Previous storage
Referenced by LIBMTP_Get_Storage().
char* LIBMTP_devicestorage_struct::StorageDescription
A brief description of this storage
Examples:
folders.c, and sendtr.c.
Referenced by LIBMTP_Dump_Device_Info(), and LIBMTP_Get_Storage().
uint16_t LIBMTP_devicestorage_struct::StorageType
Storage type
Referenced by LIBMTP_Dump_Device_Info(), and LIBMTP_Get_Storage().
char* LIBMTP_devicestorage_struct::VolumeIdentifier
A volume identifier
Referenced by LIBMTP_Dump_Device_Info(), and LIBMTP_Get_Storage().
Author
Generated automatically by Doxygen for libmtp from the source code.
Version 1.1.3 Sun Feb 17 2013 LIBMTP_devicestorage_struct(3)