|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Output formatting
Hi,
Below is some code that i have written: Code:
grep -c "$month" ./logs/*.logs | sed 's/\.\/logs\//\t/g' | sed 's/.logs:/\t/g' This searches the log directory for the .log files based on the month that the user enters into the program. It then outputs the name of each .log file and the matches to the right of it. The problem is i cant get the matches to all become alligned in a seperate column to the log names. I have a "\t" to try and tab them accross, but as some of the filenames are longer than the others they do not all align properly. Could anyone help me with this? Thanks |
|
#2
|
||||
|
||||
|
Isn't this what awk does?
__________________
# Jeremy Explain your problem instead of asking how to do what you decided was the solution. |
|
#3
|
|||
|
|||
|
Yeah, I was just wondering if there were any other ways around it, opposed to using awk.
|
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Output formatting |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|