View previous topic :: View next topic |
Author |
Message |
StarF Guru
Joined: 12 Sep 2004 Posts: 368
|
Posted: Mon Dec 12, 2005 8:52 am Post subject: help with some commands URGENT |
|
|
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 |
|
|
coriolan Apprentice
Joined: 21 Apr 2005 Posts: 273
|
Posted: Mon Dec 12, 2005 9:39 am Post subject: |
|
|
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 |
|
|
StarF Guru
Joined: 12 Sep 2004 Posts: 368
|
Posted: Mon Dec 12, 2005 9:59 am Post subject: |
|
|
tnx for your help done now |
|
Back to top |
|
|
Maedhros Bodhisattva
Joined: 14 Apr 2004 Posts: 5511 Location: Durham, UK
|
Posted: Mon Dec 12, 2005 2:42 pm Post subject: |
|
|
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 |
|
|
|