Questions tagged [text]

60 questions
2
votes
2 answers

Creating a text file with no newline at the end of it

I am using ldapsearch with its -y option where the password for the ldap server is read in from a file in order to ensure that the password is not left in the command history. ldapsearch requires that the password be in a file with no newlines. The…
Rich
  • 1,343
  • 7
  • 28
  • 39
1
vote
0 answers

Globus GridFtp truncates end lines in text files

I am using this configurations for the server side: Globus gridFTP server 10.6 (1467236171-85) Fedora 22, 64-bit GNOME Version 3.16.2 As for the client side I am using different clients: libcurl based client FileZilla. I upload files from a…
mtb
  • 111
  • 3
1
vote
3 answers

Is it possible to get Samba automatically convert linebreaks in files from dos to unix?

I have a shared over samba directory which i access from my windows development box. Problem is that when i create and edit files they are saved with dos linebreaks. Is there any way to configure samba to do automatic translation for all text files?…
alexeit
  • 906
  • 2
  • 16
  • 19
1
vote
2 answers

CMS that supports reusable blocks of text and variable substitution?

I'm looking for a CMS that can do the following two things: Reusable, named blocks (modules) of text that can be inserted in the content (i.e. articles, posts - the terminology differes between various CMS-es). The obvious example is a…
1
vote
2 answers

How can I replace all instances of a specified string in a text file with another string?

I have a file a.txt. I would like to replace all instances of "1.6" with "1.5" in that file, overwriting the original file.
1
vote
2 answers

DHCP lease information to file

Is there a command where I can convert the mac address column of the DHCP lease to txt file or CSV? I am setting up mac filtering on a wireless controller but just want to use copy and paste instead of typing out each MAC address. Maybe a netsh or…
JohnyV
  • 938
  • 4
  • 26
  • 45
1
vote
2 answers

Ubuntu server Logs to email want to keep formatting in email.. ( new lines where required, etc )

want to send log files from Ubuntu Server via email using sendemail but the when I do all the text in the email is all in one big mess ( one space between words new lines and spacing not brought into email ) .. no neat format ? How do I fix…
user85644
  • 13
  • 4
1
vote
2 answers

What is a descriptive name for a web service that responds with plain text?

I'm looking for the proper name for a web service that responds with text as opposed to XML. As an example this "cardServer" service will return 5 cards for a poker hand. http://hostname:8080/cardServer/deal/Game=Poker&Qty=5 The result could look…
user53568
1
vote
1 answer

Apache Send .java files as text instead of download

How do I configure my apache instance to simply load *.java files in browser instead of sending it to me as a download?
verhogen
  • 333
  • 2
  • 4
  • 14
1
vote
1 answer

An FTP client that automatically detects and converts proper newlines?

If I am mistaken if this is already the case I apologize. I do most of my work on a Linux system and use Filezilla to often upload my work, unfortunately I sometimes open a few files on my Windows PC when that is available and it messes up newlines…
John R.
  • 149
  • 3
  • 13
1
vote
1 answer

Delete a large chunk of lines from a huge file

I have a 2.8GB sql dump file in linux. I need to delete lines 18 through 3000, but I can't open it in a text editor like vim because it's so big. Any suggestions? I assume you could use sed or something similar, I just don't know the command.
icco
  • 193
  • 8
1
vote
2 answers

Adding lines to text files through Group Policy

I need to add two lines to text files using group policy. I cannot replace the files with the updated one since the content of the files differs from one machine to another, but all of them have to be updated with the two new lines. Is it possible…
Abdullah
1
vote
1 answer

a command to get the lines around a specific line of a text file

I'm looking for a command to get text around a specific line of a file. ex: file content: a b c d e f g h i j a command like: ]$ commandname -text f -lines 3 giving the output c d e f g h i
sanjan
  • 13
  • 3
1
vote
2 answers

perl mass text replace with literal dollar sign

trying to replace text patterns with dollar signs and ()s, can't get it to work. please help find /var/www/vhosts/prod/xxx/ -name "*.php"|xargs perl -w -i -p -e "s/mysql_fetch_array\($res,MYSQL_ASSOC\)/mysql_fetch_assoc(\$res);/g"
user12145
  • 1,115
  • 6
  • 28
  • 47
1
vote
0 answers

Sort two config files in the same order

I have two servers running the same set of internally developed apps. One is the "production" server, the other is the "dev/test" server. As time has gone on, the config files for the two have become more and "out of order". They mostly contain…
Egyas
  • 151
  • 2
  • 10