10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have been searching how to do this but I can't seem to find how to do it. Hopefully someone can help.
I have multiplr files, 100's example 12345-zxys.213423.zyz.txt. I want to be able to take all these files and remove the first '12345-' from each of the files. '12345-' these characters... (5 Replies)
Discussion started by: israr75
2. Shell Programming and Scripting
I have multiple files having many lines like as bvelow:
file Name a.txt
file Name b.txt
I would like to append files in the below format to a new file:
file Name c.txt (7 Replies)
Discussion started by: rramkrishnas
3. Shell Programming and Scripting
I am writing a code to append some numbers in the beginning of each line in all the files present in a directory. The number of files are really huge. The files are numbered as 1.sco, 2.sco, 4.sco (Note: 3.sco is missing).
The files currently look like this:
6 7My task is to... (4 Replies)
Discussion started by: shoaibjameel123
4. UNIX for Dummies Questions & Answers
Im trying to use wild cards to find files that start with either an upper or lower case letter e.g. list files that beginning with b or B, i also want to sort them by the time they were last modified. e.g latest file created first.
At the moment i have the following code that
ls -d... (3 Replies)
Discussion started by: parker4001
5. UNIX for Dummies Questions & Answers
I have 50 text files in a directory called "AllFiles"
I want to make a program that will go inside of the "AllFiles" Directory and count the number of lines in each individual text file. Then, the program will calculate how many more lines there are over 400 in each text file and... (7 Replies)
Discussion started by: motoxeryz125
6. Shell Programming and Scripting
I have a folder that contains hundreds of file with a names
I need rename each of this file by adding "core_" in the begiining of each file such as
core_21.msa (4 Replies)
Discussion started by: Lucky Ali
7. UNIX for Dummies Questions & Answers
Hello. I have the following issue: my txt file has the following format:
0 80282 Severe myopia contributed to Ron's inferiority complex.
0 42906 Dolphins are intelligent marine mammals. train/dr4/fklc0/sa2.txt
awk 'NR%2==0' test1.txt >... (4 Replies)
Discussion started by: li_bi
8. Shell Programming and Scripting
I want to use a script (preferably awk) which determines if the first character in a line is double-byte (as in Japanese or Chinese) and deletes it.
(in the above quote, I see Japanese on my screen for two lines - with 2 characters in the first and 3 characters in the... (8 Replies)
Discussion started by: ubbeauty
9. Shell Programming and Scripting
I want to script out deleting the first field of a file when it is created. I'm looking to store the output of an ls -l commad to a file but leaving off the permissions so when the file is opened I see something like;
2 bin bin 256 Feb 6 2005 mnt
5 root system 256... (2 Replies)
Discussion started by: daveisme
10. Shell Programming and Scripting
I've been searching around here and other places, but can't put this together...
I've got a unique list of words in file 1 (one word on each line).
I need to delete each line in file2 that begins with the word in file1.
I started this way, but want to know how to use file1 words instead... (13 Replies)
Discussion started by: michieka
EDITLINE(3) Library Functions Manual EDITLINE(3)
editline - command-line editing library with history
Editline is a library that provides an line-editing interface with text recall. It is intended to be compatible with the readline library
provided by the Free Software Foundation, but much smaller. The bulk of this manual page describes the user interface.
The readline routine returns a line of text with the trailing newline removed. The data is returned in a buffer allocated with malloc(3),
so the space should be released with free(3) when the calling program is done with it. Before accepting input from the user, the specified
prompt is displayed on the terminal.
The add_history routine makes a copy of the specified line and adds it to the internal history list.
A program that uses this library provides a simple emacs-like editing interface to its users. A line may be edited before it is sent to
the calling program by typing either control characters or escape sequences. A control character, shown as a caret followed by a letter,
is typed by holding down the ``control'' key while the letter is typed. For example, ``^A'' is a control-A. An escape sequence is entered
by typing the ``escape'' key followed by one or more characters. The escape key is abbreviated as ``ESC''. Note that unlike control keys,
case matters in escape sequences; ``ESC F'' is not the same as ``ESC f''.
An editing command may be typed anywhere on the line, not just at the beginning. In addition, a return may also be typed anywhere on the
line, not just at the end.
Most editing commands may be given a repeat count, n, where n is a number. To enter a repeat count, type the escape key, the number, and
then the command to execute. For example, ``ESC 4 ^f'' moves forward four characters. If a command may be given a repeat count then the
text ``[n]'' is given at the end of its description.
The following control characters are accepted:
^A Move to the beginning of the line
^B Move left (backwards) [n]
^D Delete character [n]
^E Move to end of line
^F Move right (forwards) [n]
^G Ring the bell
^H Delete character before cursor (backspace key) [n]
^I Complete filename (tab key); see below
^J Done with line (return key)
^K Kill to end of line (or column [n])
^L Redisplay line
^M Done with line (alternate return key)
^N Get next line from history [n]
^P Get previous line from history [n]
^R Search backward (forward if [n]) through history for text;
prefixing the string with a caret (^) forces it to
match only at the beginning of a history line
^T Transpose characters
^V Insert next character, even if it is an edit command
^W Wipe to the mark
^X^X Exchange current location and mark
^Y Yank back last killed text
^[ Start an escape sequence (escape key)
^]c Move forward to next character ``c''
^? Delete character before cursor (delete key) [n]
The following escape sequences are provided.
ESC ^H Delete previous word (backspace key) [n]
ESC DEL Delete previous word (delete key) [n]
ESC ESC Show possible completions; see below
ESC SP Set the mark (space key); see ^X^X and ^Y above
ESC . Get the last (or [n]'th) word from previous line
ESC ? Show possible completions; see below
ESC < Move to start of history
ESC > Move to end of history
ESC b Move backward a word [n]
ESC d Delete word under cursor [n]
ESC f Move forward a word [n]
ESC l Make word lowercase [n]
ESC m Toggle if 8bit chars display as themselves or with
an ``M-'' prefix
ESC u Make word uppercase [n]
ESC y Yank back last killed text
ESC w Make area up to mark yankable
ESC nn Set repeat count to the number nn
ESC C Read from environment variable ``_C_'', where C is
an uppercase letter
The editline library has a small macro facility. If you type the escape key followed by an uppercase letter, C, then the contents of the
environment variable _C_ are read in as if you had typed them at the keyboard. For example, if the variable _L_ contains the following:
Then typing ``ESC L'' will move to the beginning of the line, kill the entire line, enter the echo command needed to clear the terminal (if
your terminal is like a VT-100), and send the line back to the shell.
The editline library also does filename completion. Suppose the root directory has the following files in it:
If you type ``rm /v'' and then the tab key. Editline will then finish off as much of the name as possible by adding ``munix''. Because
the name is not unique, it will then beep. If you type the escape key followed by either a question mark or another escape, it will dis-
play the two choices. If you then type a period and a tab, the library will finish off the filename for you:
The tab key is shown by ``[TAB]'' and the automatically-entered text is shown in italics.
BUGS AND LIMITATIONS
Cannot handle lines more than 80 columns.
Simmule R. Turner <uunet.uu.net!capitol!sysgo!simmy> and Rich $alz <firstname.lastname@example.org>. Original manual page by DaviD W. Sanderson