10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I have a list of words separated by spaces I am trying to delete from a text file, and I could not figure out what is the best way to do this.
what I tried (does not work) :
delete="password key number verify"
arr=($delete)
for i in arr
{
sed "s/\<${arr}\>]*//g" in.txt
}
>... (5 Replies)
Discussion started by: Hawk4520
5 Replies
2. UNIX for Dummies Questions & Answers
Hi there, newbie there. I've been browsing the forums hoping to find a solution that answers a problem similar to what I need, but haven't had much luck. Any help would be greatly appreciated. Thanks!
I need to delete a bunch of text between every appearance of two words in a really large file... (3 Replies)
Discussion started by: lendl
3 Replies
3. UNIX for Dummies Questions & Answers
I have a file that looks some like this:
I need to delete most of the information and sort the rest in such way that I get the following output file
Any help will be greatly appreciated (3 Replies)
Discussion started by: Xterra
3 Replies
4. Shell Programming and Scripting
i want to write a shell script that correct a text file.for example if i have the input file:
"john has has 2 apples
anne has 3 oranges oranges"
i want that the output file be like this:
"john has 2 apples
anne has 3 oranges"
i've tried to read line by line from input text file into array... (11 Replies)
Discussion started by: cocostaec
11 Replies
5. Shell Programming and Scripting
Guys,
Here is the txt file...
SLIC N0SLU704034789 rŒ° EJ00 ó<NL DMRG>11 100 4B 2
SLIC N0SLU704034789 rΡ TJ10 <4000><NL> 2
SLIC N0SLU704034789 ... (2 Replies)
Discussion started by: gowrishankar05
2 Replies
6. Shell Programming and Scripting
I have a file that needs to be cleaned up. Here is the file:
Project
Project John
Project Gary
Project Sean
Project2
Project2 Lisa
Project2 Tyler
Project2 Sam
Project3
Project3 Mike
Project3 Bran
I need the o/p to be:
Project
John
Gary
Sean
Project2 (7 Replies)
Discussion started by: leepet01
7 Replies
7. Shell Programming and Scripting
Hi !!!
I need to write a script(ksh) that deletes any character outside <start> tag and </start> from a file.
For eg:
$cat file.txt
<start>
ad
bd
</start>
as</start>
<start>
d
e
f
mb<start>mu
g
h
i (7 Replies)
Discussion started by: PRKS
7 Replies
8. Shell Programming and Scripting
Hi
Is it possible to do the following in a single command
/usr/xpg4/bin/sed -e '/rows selected/d' /aemu/CALLAUTO/callauto.txt > /aemu/CALLAUTO/callautonew.txt
/usr/xpg4/bin/sed -e '/^$/d' /aemu/CALLAUTO/callautonew.txt > /aemu/CALLAUTO/callauto_new.txt
exit (1 Reply)
Discussion started by: aemunathan
1 Replies
9. Shell Programming and Scripting
Hi
Please tell me how could i delete symbols, whitespaces, characters, words everything between two words in a line. Let my file is
aaa BB ccc ddd eee FF kkk xxx
123456 BB 44^& iop FF 999
xxx uuu rrr BB hhh nnn FF 000
I want to delete everything comes in between BB and FF( deletion... (3 Replies)
Discussion started by: rish_max
3 Replies
10. Shell Programming and Scripting
Hi Friends,
We have four filenames with first few digits are identical.From those files, i need to pick up 2 files based on my parameter.
The following example will give more information to understand my question.
Files in the directory:
small_customer_aa.csv
small_customer_ab.csv... (6 Replies)
Discussion started by: HAA
6 Replies
PASTE(1) BSD General Commands Manual PASTE(1)
NAME
paste -- merge corresponding or subsequent lines of files
SYNOPSIS
paste [-s] [-d list] file ...
DESCRIPTION
The paste utility concatenates the corresponding lines of the given input files, replacing all but the last file's newline characters with a
single tab character, and writes the resulting lines to standard output. If end-of-file is reached on an input file while other input files
still contain data, the file is treated as if it were an endless source of empty lines.
The options are as follows:
-d list Use one or more of the provided characters to replace the newline characters instead of the default tab. The characters in list
are used circularly, i.e., when list is exhausted the first character from list is reused. This continues until a line from the
last input file (in default operation) or the last line in each file (using the -s option) is displayed, at which time paste
begins selecting characters from the beginning of list again.
The following special characters can also be used in list:
newline character
tab character
\ backslash character
Empty string (not a null character).
Any other character preceded by a backslash is equivalent to the character itself.
-s Concatenate all of the lines of each separate input file in command line order. The newline character of every line except the
last line in each input file is replaced with the tab character, unless otherwise specified by the -d option.
If '-' is specified for one or more of the input files, the standard input is used; standard input is read one line at a time, circularly,
for each instance of '-'.
The paste utility exits 0 on success, and >0 if an error occurs.
SEE ALSO
cut(1)
STANDARDS
The paste utility is expected to be IEEE Std 1003.2 (``POSIX.2'') compatible.
BSD
June 6, 1993 BSD