I'm trying to match html strings using grep commend and I'm not able to eliminate the extra spaces. This is working when there is no space. Can anyone help me what am I missing here?
I'm able to match KayDee where there is no space. grep commands tried:
HTML code :
With space :
Without space :
Last edited by rbatte1; 07-16-2019 at 11:01 AM..
Reason: Added CODE tags
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)
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)
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)
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)
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)
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)
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)
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)
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)
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
LEARN ABOUT XFREE86
zgrep
ZGREP(1) General Commands Manual ZGREP(1)NAME
zgrep - search possibly compressed files for a regular expression
SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename...
DESCRIPTION
Zgrep invokes grep on compressed or gzipped files. These grep options will cause zgrep to terminate with an error code:
(-[drRzZ]|--di*|--exc*|--inc*|--rec*|--nu*). All other options specified are passed directly to grep. If no file is specified, then the
standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep.
If the GREP environment variable is set, zgrep uses it as the grep program to be invoked.
EXIT CODE
2 - An option that is not supported was specified.
AUTHOR
Charles Levert (charles@comm.polymtl.ca)
SEE ALSO grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1)ZGREP(1)