|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Help with basic C Shell commands:
Hey, I have some questions:
1. i have a string, lets say: " <SPACES AND TABS HERE> 11/22/2004 <SOME MORE SPACES AND TABS>" i want to strip the date how can I do it? tried with 'cut' but it wont work... 2. I did foreach F (*) now, after i know its a file, i want to take the first line from it, and then the second, etc etc, how can i do it? 3. how can i check if a character is tab? in an if for instance? 4. if commands like cut, in the delimitier for instance, how do i write a list of delimiters? like -d ???LIST HERE???? thanks |
|
#2
|
|||
|
|||
|
You can use sed command.
Code:
echo " 11/22/2004 " | sed 's/[ ]//g' here in sed's/[***]//g' where *** is 'a space followed by a tab' HTH
__________________
Dinesh_P_V |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Help with basic C Shell commands: |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|