i need to change string in all files in current folder and all subfolders. i wrote the following script. It works good except it dont delete temp file from subfolders.
for z in `find . -type f -name "*.html" -o -name "*.htm"`; do
sed -e 's@abc@xyz@g' $z>temp;
mv temp $z;
done
any idea?... (1 Reply)
Hi
I have an XML file with strings XABCD, XEFGHX and XIJKLX. I would like to replace XABCDX with "This is the first string", XEFGHX with "This is the second string" and XIJKLX with "This is the third string".
What is the best way to implement this? Should I have a file with the data that is... (4 Replies)
Hi,
i call my shell like:
my_shell "my project name"
my script:
#!/bin/bash -vx
projectname=$1
sed s/'PROJECT_NAME ='/'PROJECT_NAME = '$projectname/ <test_config_doxy >temp
cp temp test_config_doxy
the following error occurres:
sed s/'PROJECT_NAME ... (2 Replies)
Hi all,
I have a directory structure like "folder1/folder2/website_name/folder3/folder4/file.php."
I need to write a script which will enter into file.php and replace a particular string of characters with "website_name" folder name.
In folder2,there are many such website's folders kept.So... (4 Replies)
Can someone tell me how I can do this?
e.g:
a=$(echo -e wert trewt ertert ertert ertert erttert
erterte
rterter
tertertert
ert)
How do i replace the STRING with $a?
I try this:
sed -i 's/STRING/'"$a"'/g' filename.ext
but this don' t work (2 Replies)
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Hi,
Here's my dilemma.
I need to replace the string Sept_2012 to Oct_2012 in all *config.py files within the current directory and below directories
Is this possible?
Also I am trying to find all instances of the string Sept_2012 within files in the current directory and below
I have... (13 Replies)
Hello,
I do have several files in one folder each file contains measurement data.
for each file I would like to replace the character "," by "." ?
How can I do this and how can I do this for each file at once?
E.G. data_1.dat, data_x.dat (original version)
data_1out.dat, data_x_out.dat... (10 Replies)
Sorry for the long/weird title but I'm stuck on a problem I have. I have this XML file:
</member>
<member>
<name>TransactionID</name>
<value><string>123456789123456</string></value>
</member>
<member>
<name>Number</name>
... (9 Replies)
Discussion started by: cozzin
9 Replies
LEARN ABOUT DEBIAN
mtp_objects
The object management API.(3) libmtp The object management API.(3)NAME
libmtp - The object management API.
Functions
int LIBMTP_Delete_Object (LIBMTP_mtpdevice_t *, uint32_t)
int LIBMTP_Set_Object_Filename (LIBMTP_mtpdevice_t *, uint32_t, char *)
Detailed DescriptionFunction Documentation
int LIBMTP_Delete_Object (LIBMTP_mtpdevice_t *device, uint32_tobject_id)
This function deletes a single file, track, playlist, folder or any other object off the MTP device, identified by the object ID.
If you delete a folder, there is no guarantee that the device will really delete all the files that were in that folder, rather it is
expected that they will not be deleted, and will turn up in object listings with parent set to a non-existant object ID. The safe way to do
this is to recursively delete all files (and folders) contained in the folder, then the folder itself.
Parameters:
device a pointer to the device to delete the object from.
object_id the object to delete.
Returns:
0 on success, any other value means failure.
References LIBMTP_mtpdevice_struct::params.
int LIBMTP_Set_Object_Filename (LIBMTP_mtpdevice_t *device, uint32_tobject_id, char *newname)
THIS FUNCTION IS DEPRECATED. PLEASE UPDATE YOUR CODE IN ORDER NOT TO USE IT.
See Also:
LIBMTP_Set_File_Name()
LIBMTP_Set_Track_Name()
LIBMTP_Set_Folder_Name()
LIBMTP_Set_Playlist_Name()
LIBMTP_Set_Album_Name()
References LIBMTP_file_struct::filetype, and LIBMTP_Get_Filemetadata().
Author
Generated automatically by Doxygen for libmtp from the source code.
Version 1.1.3 Sun Feb 17 2013 The object management API.(3)