By definition, text files meet all of the following requirements:
the file does not contain any NUL characters,
every line in the file is terminated by a <newline> character, and
no line in the file (including the terminating <newline> character) contains more than LINE_MAX bytes.
On many systems, LINE_MAX is 2048. The value on your system can be determined using the command:
The message you are getting probably indicates that the file you are trying to edit is not a text file because it violates requirement #3 in the list above.
If you want to split long lines in a file into shorter, adjacent lines that meet the requirements of a text file, try using the fold utility. If you want to split long lines into segmented files where one file contains the 1st X characters from each line from an input file and another file contains the X+1st through the 2Xth character from each line from an input file, etc.; try using the cut utility.
Without knowing more about the format and contents of the file you are trying to edit and the changes you want to make to that file, it is hard to suggest anything more specific.
These 3 Users Gave Thanks to Don Cragun For This Post:
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
i have an ip file like
121
1213412
34345353
long file
want to made each line as 20digit long append zero "0" in front
as 121
become
00000000000000000121 (1 Reply)
Hi,
Always when I login to Unix, I need to give the following command to view the data properly;
export MAESTRO_OUTPUT_STYLE=LONG
The reason is that by default the settings export MAESTRO_OUTPUT_STYLE=SHORT
Please let me know how I could make LONG as the default and avoid giving the... (1 Reply)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
I have a bunch of random character lines like ABCEDFG. I want to find all lines with "A" and then change any "E" to "X" in the same line. ALL lines with "A" will have an "X" somewhere in it. I have tried sed awk and vi editor. I get close, not quite there. I know someone has already solved this... (10 Replies)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Hi,
I am using awk here.
Inside an awk script, I have a variable which contains a very long XML data in string format (500kb).
I want to pass this data (as argument) to curl command using system function.
But getting Too many arguments error due to length of string data(payloadBlock).
I... (4 Replies)
Okay, so I have a rather large text file and will have to process many more and this will save me hours of work.
I'm not very good at scripting, so bear with me please.
Working on Linux RHEL
I've been able to filter and edit and clean up using sed, but I have a problem with moving lines.
... (9 Replies)
Dear Ladies & Gents,
I have a requirement to delete all the log files in /var/log/test directory that are older than 10 days and their first line begin with "MSH" or "<?xml" or "FHS". I've put together the following BASH script, but it's erroring out:
for filename in $(find /var/log/test... (2 Replies)
Hi everybody,
I am new at Unix/Bourne shell scripting and with my youngest experiences, I will not become very old with it :o
My code:
#!/bin/sh
set -e
set -u
export IFS=
optl="Optl"
LOCSTORCLI="/opt/lsi/storcli/storcli"
($LOCSTORCLI /c0 /vall show | grep RAID | cut -d " "... (5 Replies)
Discussion started by: Subsonic66
5 Replies
LEARN ABOUT DEBIAN
logjam
logjam(1) LiveJournal logjam(1)NAME
logjam - GTK+ client for LiveJournal
SYNOPSIS
logjam [OPTIONS] [FILE]
DESCRIPTION
logjam is a GTK+ client for LiveJournal-based sites such as livejournal.com.
Aside from writing entries, logjam lets you modify your friends list, edit your previous entries, and more.
When run with no arguments (or just username option), logjam will run in the GUI mode. The user interface is mostly self-explanatory, and
won't be discussed here in detail, except for a few notes below.
OPTIONS AND COMMANDS
Options can be given in either short or long forms. For help on a particular commands, type "logjam COMMAND help". For example, "logjam
grep help" will supply help about the grep command.
Options:
-v, --version
Show version of program.
-q, --quiet
Say less.
-u, --username=USERNAME
Username to operate as.
-p, --password=PASSWORD
Password for the current user.
-a, --postas=USERNAME
User/community to post as.
-f, --file=FILE
File to load.
-e, --edit
Use default editor to edit post.
Subcommands:
checkfriends Efficiently check friends list for updates.
console Run a command on the LiveJournal console.
post Post event immediately.
offline Manage offline copies of your journal.
user Manage user list.
Also, GTK+ command line options (such as --display) can be used.
GUI
This section describes some of the GUI features that aren't immediately apparent.
Check Friends
logjam can monitor your friends list and notify you when new entries are posted there. Enable this by right-clicking on the indicator at
the bottom-left corner of the application window and selecting the appropriate menu item. You may also configure logjam to start doing this
automatically for you when you login. When new entries are detected, the indicator will turn red to let you know; click it to resume
monitoring or double-click it to open your browser on your friends page. Optionally, you can have logjam open a small "floating" indicator
which has some useful GUI settings of its own.
Owners of large friends lists may prefer to be notified only after they accumulate several new posts. You may set the threshold for this in
the Check Friends settings tab. The default is 1, that is, logjam will tell you immediately when it detects new traffic on your friends
page. There is a small limit on the maximum threshold allowed, because this feature is only useful with small threshold values.
STARTUP
When given a FILE argument, logjam will start up with an existing file as the base for the composed entry. If the filename given is "-",
the data will be read from standard input. Several aspects of the entry, such as its subject field and the journal in which to post it to,
can be controlled by other options. This is useful in conjunction with the --commandline option, which causes logjam to post an entry
without going to GUI mode, allowing completely non-interactive posts. If you do wish to interactively edit the entry, but don't want to
load the GUI, use the --edit option.
Autosave
logjam will periodically save a draft of your currently edited entry in ~/.logjam/draft if you turn on the draft option in the Preferences
dialog. This feature is intended for crash recovery, not archiving. If you want to keep a copy of your posts, you should use the
Entry > Save As menu option before submitting them. A future version of logjam will support archiving of your journal.
Please note that when you exit the client normally, your draft is cleared. It does not "stick" for the next invocation, as in the behavior
of some other clients.
Checking friends from the command line
You can use logjam as a backend for a script or another application that wishes to check the friends view. This may be useful if you don't
want to use the GUI, or if you have several journals (in conjunction with --username). To do this, invoke logjam once with
--checkfriends=purge (-rpurge if you're using short options), and then something like:
logjam --checkfriends && new-entries-handler
Make sure that your script or application purges the checkfriends status as described above once the user has acknowledged the new items,
otherwise logjam will always report there's nothing new. You should also pay attention to limiting your query rate, despite the fact that
logjam will refuse to flood the server with queries. For more information, see the messages on the command line. (To suppress these
messages, use --quiet.)
SEE ALSO
<http://logjam.danga.com>
<http://www.livejournal.com/users/logjam/>
<http://www.livejournal.com>
AUTHOR
This manual page was mostly written by Gaal Yahas <gaal@forum2.org>.
4.1.1 2003-04-25 logjam(1)