Sponsored Content
Full Discussion: Grep spacing issue
Top Forums UNIX for Beginners Questions & Answers Grep spacing issue Post 303036890 by rbatte1 on Tuesday 16th of July 2019 10:11:16 AM
Old 07-16-2019
Can you paste in some sample input? (in CODE tags) and which command gives you which output please?

It might be that it looks like a space to a human but it is something else however the [^ ] might actually be saying "not space" as the next character after the <span> literal text you have so your serach would ignore it.

I might have missed the point, but I'm sure someone here can help.



Kind regards,
Robin
This User Gave Thanks to rbatte1 For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

spacing question

hi , i have follwing strings in a text file hello i am cool hey i am cool arrey i am cool in all the above 3 i wanna retrieve cool.......for this i used split(/ /) but it takes into consideration only one space.......is there any regular expression to do the trcik? ... (7 Replies)
Discussion started by: vivekshankar
7 Replies

2. Shell Programming and Scripting

character spacing issue

I have a script that has a counter in it, the output from the script puts the values in columns, and when the values are greater than 9 it moves the rest of the row over, hence displacing the columns. Is their something I can do to make these values fit in their respective column? I tried typing an... (1 Reply)
Discussion started by: wxornot
1 Replies

3. Shell Programming and Scripting

How to adjust spacing

Is there a way to adjust spacing of a line using k shell? e.g I have a file below $ cat file1 AAA BBB CCC A B C AAAA BB CC I want each word to be adjusted with spaces to have 10 character length like below: AAA BBB CCC A B C AAAA BB CC Any... (4 Replies)
Discussion started by: stevefox
4 Replies

4. Shell Programming and Scripting

spacing problem

Hi guys, I have this little code: for directory in / $(echo $path | tr '/' ' ' ) do cd $directory echo "$(ls -ld | cut -c2-10 | sed 's/.\{3\}/& /' | sed 's/.\{7\}/& /' | sed 's/.\{1\}/& /g')" " $directory" done The output of this will be showing the permissions with spaces so it will... (2 Replies)
Discussion started by: darkhider
2 Replies

5. Homework & Coursework Questions

Join command help with spacing

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I have to join 3 files numerically according to ID(first column) with no comments. In the end i'll be something... (0 Replies)
Discussion started by: bigubosu
0 Replies

6. Shell Programming and Scripting

Spacing between words

Hi I have a csv file in below format First Line=1 Second Line=2 And the third Line=3 Now comes the fourth Line=4 I want to insert spaces so that the output would be First Line=1 Second Line=2 And the third Line=3 Now comes the fourth Line=4 Can anyone help me do... (10 Replies)
Discussion started by: msivask
10 Replies

7. UNIX for Dummies Questions & Answers

Help with the spacing

while IFS="" read r; do printf "XXX\t%s\n" "$r" done < test1.txt > test.txt The issue is, XXX wud be a dummy column/row added to the file..But i want this XXX column to be a separated as a TAB Delimiter it should be something like XXX 1 XXX 2 (3 Replies)
Discussion started by: saggiboy10
3 Replies

8. UNIX for Dummies Questions & Answers

paste command without spacing?

I'm trying to combine text files without a space. So if i use the paste command paste file1 file2 file3 > file4 the new file created has spacing between the contents of the once individual files. Is there some trick I can do with a delimiter that removes the spaces.. like paste -d'' or... (1 Reply)
Discussion started by: steveinthebox
1 Replies

9. UNIX for Dummies Questions & Answers

Define spacing of columns

Hi! I need to change the spacing assigned to each number in a text file. I have an input file with 5 columns and 3 rows. Here, all numbers are separated by 1 space. I need to change this in such a way that the number in the first column has 6, the number in the second column has 5 and all other... (2 Replies)
Discussion started by: Alauda
2 Replies

10. UNIX for Dummies Questions & Answers

output spacing and formatting

here is my code and output, i just want to display it clearly to the users. how can I fix the spacing or put some headers like NAME, DEV id, Size, Meta code: symdg show $INS-${SNAP} | egrep "D-" | awk '{print $1,$3,$NF,$5}' output: D-arch 23C2 983040 (M) D-db 0704 245760 (M) D-undo 07DB... (12 Replies)
Discussion started by: prodigy06
12 Replies
dfc(1)								   USER COMMANDS							    dfc(1)

NAME
dfc - display file system space usage using graph and colors SYNOPSIS
dfc [OPTION(S)] [-c WHEN] [-u UNIT] [-t FILESYSTEM] DESCRIPTION
dfc(1) is a tool similar to df(1) except that it is able to show a graph along with the data and is able to use color (color mode is "color-auto" by default but you can change this with "-c" option). The available size correspond to the space available to a user point of view and not from root's perspective (ie: use f_bavail instead of f_bfree). In the same idea, used space is computed simply by substracting the available space from the total size. Without any argument, size is displayed in human readable format. Be aware that when using human-readable format, there might be some rounding when computing the size. If you want maximum precision, use the "-u" option and choose the unit. dfc(1) also has a built in feature that makes the output auto adjust based on terminal width. If you want to override this behavior, use the "-f" option. OPTIONS
-a Show information about all file systems found in the mtab file. -b Do not show the graph bar. -c [WHEN] Choose color mode where WHEN is one of the following sub-option: "always": Color will always be used, no matter what stdout is. "auto": This is default when "-c" is not activated. Color is used only if "stdout" is a terminal. For instance, color will be disabled with this option if you pipe the output of dfc(1) into another command. "never": Color will never be used. -f Override auto-adjust behavior by forcing information to be displayed. You probably do not want to activate this option but choice is yours. This option may be useful if you pipe the output of dfc(1) though. -h Show a short help text. -i Show information about inodes. -m Use SI units (metric) (ie: size is computed using powers of 10 instead of powers of 2). -n Do not print header. -o Show mount options. -s Sum the total usage. -t [FILESYSTEM] Allows you to perform filtering on file system type. FILESYSTEM could take any known file system value. For instance, "ext4", "ufs", "tmpfs", "reiserfs", etc. Multiple selection on file system is also possible. In this case, FILESYSTEM needs to be comma separated (without spaces). For instance, if you want to filter "ext4" and "tmpfs", you would use the following: dfc -t ext4,tmpfs You can also use negative matching to filter the output. To do so, you just need to prepend a "-" to FILESYSTEM. In the following example, dfc(1) will display all file system type except those mentionned: dfc -t -rootfs,tmpfs -T Show filesystem type. -u [UNIT] Show size using unit specified. UNIT can take one of the following value: "h": Human readable (default when not using "-u" option). "b": Show bytes. "k": Show size using Kio. "m": Show size using Mio. "g": Show size using Gio. "t": Show size using Tio. "p": Show size using Pio. "e": Show size using Eio. "z": Show size using Zio. "y": Show size using Yio. NOTE: When using "-u" option along with "-m" option, those suboptions are replaced by their SI counterparts. -v Print dfc(1) version and exit. -w Use a wider bar. -W Wide path name (avoid truncation of file name). May require a larger display. BUGS
If you find one, please contact the author and explain what you encounter. AUTHORS
Robin Hahling (robin.hahling (at) gw-computing.net) COPYRIGHT
Copyright (C) 2012 Robin Hahling LICENSE
3 Clauses BSD SEE ALSO
df(1), du(1) version 2.5.0 April 3, 2012 dfc(1)
All times are GMT -4. The time now is 05:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy