Software :: General Tool To Manipulate Text Configuration Files
Mar 25, 2010
Is there any Linux tool to create new or modify exiting key/value pairs in text configuration files? For example, to change a setting in xorg.conf, or change something in etc/networking/interfaces? I know it could be done by sed or by perl scripts, but it could be easier to have a program for this purpose. There are many difficulties for this job that the program should consider, and I am facing nearly all of them:
- Some configuration files may have sections. Like in Windows-type INI files (for example: "[something]"), or like Section in xorg.conf. More sections with the same name can occur, like in xorg.conf.
- If the key/value pair originally does not exist, then the program should add it. But not to the end of the file, but tothe end of a predefined section.
- Config files can have remark lines. Remark text can be even at the same line than the key/value pair. After modifying the value, the original remark text should not change at the end of the line. The remark-starting symbol is not always.
- The values in configuration files are not always simple numbers or simple words, but in rare cases, they are composed by more words, for example: item=name address phone
And of course, we can have remark at the end, like this: item=name address phone # remark text
- The key-value separator depends on the file. Some files use "key=value" format, some other use "key value" format, or even "key1 key2 value", like xorg.conf. The as separator can also occur.
- Case sensitivity can also be an issue.
- Sometime to desired task is not to modify a value, but to add or remove a line beginning remark to a certain line.
I think that managing all these possible cases by a perl or sed program is nearly impossible. I begun to write a C program, but maybe there is already one?
View 6 Replies
ADVERTISEMENT
May 26, 2011
I wonder capability of awk to manipulate data in consecutive multi files by read one batch file.for example I have files: data1.dat, data2.dat,data3.dat and listfile.txt
cat data1.dat
23 34 54
43 45 76
[code]...
View 4 Replies
View Related
Jun 11, 2010
Have managed to create a simple script to poll the various printers we have at our company for a page count via SNMP. At the moment the script echos the printer name to a text file and then the snmp output is appended to the next line. In my rush I thought by using sed to add a comma to the end of each line would mean it would import in to excel nicely. So rather than having:
Printer 1,
45536,
Printer 2,
[code]...
View 3 Replies
View Related
Mar 30, 2009
I am trying to find a best tool to track configuration files changes. I did find some information about osec and mactime, but, it seems, that they are not included in fedora/rpmfusion package databases. is there any tool that can be installed as a package?
View 8 Replies
View Related
Jan 17, 2010
What we want to do: be able to see the contents of an iso image (what files exist in the iso image) as well as being able to add data to the iso file or remove them.In order to be able to see the contents of an iso image we have to follow a process similar of that like mounting a device. In order to do so let us assume that we have the file: example.iso, under /home folder.In order to do so, we have to install the program isomaster (go to synaptic package manager and type isomaster and the program will be displayed) and then open it (via applications->sound&video). Then, browse to where the iso image exists and with the options: remove, extract, e.t.c. do the necessary steps you want. In order to save this "new" iso image with the additions you have made, you have to save it as an iso file. Go to file, save as and your new iso file is ready to be burned.
View 3 Replies
View Related
Oct 24, 2010
I want a command line tool that echoes a string in ASCII art way, like here.
View 2 Replies
View Related
Jun 17, 2010
The new feature in Gimp 2.7 that attaches basic text formatting options (bold, italicunderline, strike-through) to the active text box is either buggy or just bad design.The text edit buttons are actually being placed on top of the text box (which contains text) instead of off to the side, and that is causing me to not be able to see the text.See screenshot for example:GIMP version: 2.7.1Am I doing something wrong or are others experiencing this too?
View 1 Replies
View Related
Dec 14, 2010
How to install linux by using text mode or fdisk tool
View 3 Replies
View Related
Jan 15, 2010
may be an advanced question but I need to know how to do this. Here at work I am in charge of recruiting and we have about 1,000 resumes in already. All of the resumes are in a .pdf format. I need to rename every .pdf in the following format:{firstnameLastname}.pdfThe only way I know how to do this is to convert all the .pdf files to text, extract the name out of the first few lines of text, import into excel, and then use VBA to rename the files in mass:Here is my logic so far:~Deskop/a = houses all the .pdfresumesOpen terminal: Code: cd ~/Desktop/afor f in *.pdf; do pdftotext -raw $f; done That will convert all of the preceding resumes into text filesNow I would like to append the name of the text file into the last line of the text file. So, for example, for Resume1.txt, I want to append "Resume1.txt" to the last line within Resume1.txt. So after I run the command I open Resume1.txt and on the last line within I want to see "Resume1.txt" on the last line, at the end of the resume.How can I do this? I would like to use a loop and have the terminal append the filename to the body of the text file until all of the have been appended.
View 1 Replies
View Related
Apr 21, 2010
Currently, when I'm searching text in files of my PHP project, I use this line :
Code:
grep -r 'myTextToFind' *
But now, I would like to search only in ".lang" files. How can I do that ?
View 7 Replies
View Related
Jan 22, 2010
I have 2 text files : file1.txt and file2.txt
cat file1.txt
15 this is a sentence containing various words and spaces
34 this is a another sentence containing various words and spaces
cat file2.txt
2 this is sentence1file2
6 this is sentence2file2
54 this is sentence3file2
I would like to join these 2 files. The result should look as follows :
cat joinedfile.txt
2 this is sentence1file2
6 this is sentence2file2
15 this is a sentence containing various words and spaces
34 this is a another sentence containing various words and spaces
54 this is sentence3file2
==> so the joined file must be sorted on the first number. Any ideas how this can be achieved ?
View 4 Replies
View Related
Jan 27, 2011
does anyone knows if i can find a configuration tool like "Yast" that works on Solaris 10 ?
View 1 Replies
View Related
Feb 3, 2010
I have been using sed to manipulate a csv file but I have one problem that I can't solve. The csv file has many line and many columns. If in a particular line column 2 has a certain value I want to replace that value with the value in column 5 in the same line.
View 5 Replies
View Related
May 25, 2011
How do you convert Open Office (ODT) documents to Text files?
I have made a report using libre office. Now I wish to continue editing the document using lyx (latex front end). So the ODT file needs to be saved as some .tex file.
I don't see an option to do this in File menu (export/save as). So is there any other plugin to do this?
View 1 Replies
View Related
Aug 13, 2011
I'm looking for a tool which can monitor whether a process is near limit of maximum open files.
View 1 Replies
View Related
Aug 24, 2011
My collection contains some MP3s which have some glitches like
displaying the wrong duration on loading
minor jumps
suddenly ending despite the duration claims another minute remaining
noise
I'm looking for a tool that can detect as many of these glitches as possible and fix those that can be fixed (obviously e.g. noise can not simply be eliminated in most cases).
View 2 Replies
View Related
May 25, 2011
I am trying to use some text to speech tool named pyttsx in ubuntu Linux 9.
but I get the following message, does anybody know, which package should I use, to solve this package ?
Code:
aarsh@aarsh-desktop:~/program_files/pyttsx-1.0$ sudo python setup.pyTraceback (most recent call last):
File "setup.py", line 18, in <module>
from ez_setup import use_setuptools
ImportError: No module named ez_setup
aarsh@aarsh-desktop:~/program_files/pyttsx-1.0$
View 2 Replies
View Related
Jun 1, 2010
Can I use sed to include a text file in the beginning of other text files inside a folder and its subfolders? So it should be recursive.
View 4 Replies
View Related
Nov 5, 2009
I would like to write a text user interface (TUI) to adjust some text config files etc. Is there a tool or application for creating TUIs like this. I�m talking about those types of config tools which you see executed at first boot.
View 19 Replies
View Related
May 18, 2011
Can anyone point me to a well working peace of software (free will be preferred) that can convert text-files into pdf.
View 6 Replies
View Related
Jul 14, 2010
I want the difference of two text files(a.txt & b.txt) into a third text file(c.txt). i.e. New or Differert rows of a.txt compared to b.txt
a.txt>
10128|10153|999999
10343|10153|000
10345|10153|3846
10351|10153|3846
b.txt>
10128|10153|999999
10343|10153|3853
10345|10153|3853
10349|10153|3853
c.txt should be like>
10343|10153|000
10351|10153|3846
I tried comm,but man says that the files have to be sorted in order to use comm. I dont want to sort the files.
View 3 Replies
View Related
Nov 23, 2010
find text within files? detailed at Code: man grep
View 2 Replies
View Related
Aug 9, 2010
Some pdf readers for windows allow you to highlight and type notes into PDF files. The pdf readers that I've seen for Linux only allow you to read pdfs. Are there any that allow you to highlight text and add notes?
View 2 Replies
View Related
Jan 24, 2010
I'm needing to read the Adam's Assembly Tutorials, that are old EDIT *.txt files, I'm on Linux and I need to read this files.What can I do?Is there any GUI editor that can read the files?There is any way to convert them into another file that is more modern1?
View 2 Replies
View Related
Nov 5, 2010
Is there a way, besides writing a PERL program, to read each line one by one in file A and tell if this line also exists in file B? Can this be done via a shell script?
View 6 Replies
View Related
Nov 10, 2010
i am working in gcc compiler i am opening a file using file pointer writing in the file ,entering the text from keyboard tell me the end of file indicator after entering the text
View 2 Replies
View Related
Mar 22, 2011
Combine multiple text files into one text file?
View 5 Replies
View Related
Sep 17, 2009
Is there anyway to delete certain paragraphs within a text file and then insert the paragraph into another text file.I just cannot figure out how to remove the specific lines from the file and then insert them into another file at a certain line within that new file. Thanks again
View 10 Replies
View Related
Jul 8, 2010
I have a many directories each with about 20 html files inside. All the files have .html ext. What I'm hoping is possible is from command line to find some text in each one and replace it with some other text.
Basically what I want to replace is;
/awstats/
with
awstats/
I can do this easily with dreamweaver or some other application but because I have 960 pages total to do I'm hoping to do it this way.
View 6 Replies
View Related
Jan 24, 2010
What is a good way to do it? I have been trying to do it using sed.
View 9 Replies
View Related