Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
help with some commands URGENT
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
StarF
Guru
Guru


Joined: 12 Sep 2004
Posts: 368

PostPosted: Mon Dec 12, 2005 8:52 am    Post subject: help with some commands URGENT Reply with quote

how do i:

1: if i got 2 txt files how do i move all the input from both into one file?

2: got a file with both large and small letters, how do i change that and put it into a new file?

3: how can i see the number of lines containing the word "test" in a file?

4:how can i search for a pattern in a file called "test" ?

5: i got a file i want listed by the 3 colum, how do i do that?

6: what is the command that list all the files, and put it into a new file called "files" ?

7: if i have a file and i want to output the first 4 chars in each line, how do i do that?

8: if i have a file and i want to output the first 4 chars and char 20-25 in each line, how do i do that?

9: the command that can displayes if something is writen 2 times i a file?
Back to top
View user's profile Send private message
coriolan
Apprentice
Apprentice


Joined: 21 Apr 2005
Posts: 273

PostPosted: Mon Dec 12, 2005 9:39 am    Post subject: Reply with quote

1: `cat file1 >> file2` or cat `file2 >> file1` whatever you want to be first.
2: Do you want to change the case? `cat file | tr "[:upper:]" "[:lower:]" or `cat file | tr "[:lower:]" "[:upper:]"` whatever way it was.
3: sed -n '/test/=' file
4: grep pattern test
5: excuse me?
6: ls > files
7: cut -c 1-4 file
8: cut -c 1-4,20-25 file
9: that's tougher. Do you mean a text "foo" written twice? Exactly twice or more than once?


Last edited by coriolan on Mon Dec 12, 2005 11:11 am; edited 1 time in total
Back to top
View user's profile Send private message
StarF
Guru
Guru


Joined: 12 Sep 2004
Posts: 368

PostPosted: Mon Dec 12, 2005 9:59 am    Post subject: Reply with quote

tnx for your help done now
Back to top
View user's profile Send private message
Maedhros
Bodhisattva
Bodhisattva


Joined: 14 Apr 2004
Posts: 5511
Location: Durham, UK

PostPosted: Mon Dec 12, 2005 2:42 pm    Post subject: Reply with quote

Moved from Off the Wall to Duplicate Threads in favour of commands a bit of help needed.
_________________
No-one's more important than the earthworm.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum