10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am very new to to shell scripting and facing a problem that I can't seem to solve. I want to write a bash script that edits file1.txt and saves it as file2.txt.
This is what the files should look like:
file1:
textline1
textline2
startCopy
copyThis
endCopy
textline3
textline4
file2:
... (6 Replies)
Discussion started by: sandy90
6 Replies
2. Shell Programming and Scripting
My first post, so don't kill me :)
Say i open some textfile with some example like this.
on the table are handy, bread and wine
Now i know exactly what is in and i want to separate and sorted it in terminal to an existing file with another 2 existing lines in like this:
table
plane ... (3 Replies)
Discussion started by: schwatter
3 Replies
3. UNIX for Dummies Questions & Answers
All,
I would like to cut all the lines from the log file for the timestamp . I'm not clear about how to apply grep ,awk here.Can you help me on this ?
My logfile:
**********
Wed Feb 20 03:48:26 2013
Thread 1 advanced to log sequence 400 (LGWR switch)
Thu Feb 21 02:34:23 2013... (1 Reply)
Discussion started by: arul1185
1 Replies
4. Shell Programming and Scripting
I have a textfile containing text similar to the following pattern:
STRING1
UNIQUE_STRING1
STRING2
STRING3
STRING4
STRING5
STRING1
UNIQUE_STRING2
STRING2
STRING3
STRING4
STRING5
STRING1
UNIQUE_STRING3
STRING2
STRING3 (6 Replies)
Discussion started by: ilcsfe
6 Replies
5. UNIX for Dummies Questions & Answers
how can I cut out partiluar lines like from line 233 to 347 ?
any idea? (2 Replies)
Discussion started by: kvok
2 Replies
6. Shell Programming and Scripting
I need to delete all lines with less then 32 characters from a textfile. :) (15 Replies)
Discussion started by: anna428
15 Replies
7. Shell Programming and Scripting
Hi Everyone,
I have a file a.txt, inside is
Mon Jul 20 00:05:07 2009 12
Mon Jul 20 00:05:08 2009 1
The output should be a.txt, inside is
00:05:07 12
00:05:08 1
My method is
`cat a.txt | cut -f4,6 -d' ' > a.txt.tmp;mv -rf a.txt.tmp a.txt`;
Is any good way to do this? like perl... (5 Replies)
Discussion started by: jimmy_y
5 Replies
8. Shell Programming and Scripting
i need to cut the string in a textfile but each line has a specific way of cutting it (different lengths)
i have a for loop that gets the string line per line, then each line has to be compared:
for x in `cat tmp2.txt`; do
if; then
echo 'BAC'
elif
... (6 Replies)
Discussion started by: izuma
6 Replies
9. Shell Programming and Scripting
Hi,
How to cut all lines in file before keyword?
from
1 2333214 word ...... some text
2 234343 234234 word ...... some text
3 234324 324 3234 word ...... some text
to
1 2333214
2 234343 234234
3 234324 324 3234 (4 Replies)
Discussion started by: Trump
4 Replies
10. Shell Programming and Scripting
Hi,
I have a textfile with several lines like this:
text num: USER text (num) num num
I need all these stuff. Problem is, how to get these stuff after ":".
USER is a username and all chars are possible, even whitespace. So I cant use cut. Any ideas? (3 Replies)
Discussion started by: mcW
3 Replies