Prevent word splitting with file with spaces in name
Hello,
I have a script that "validates" a ZIP file that look like this
My task is to compare its contents (i.e the list of files contained inside) with the control file that is provided inside the ZIP file itself.
Since we've started receiving files with spaces in their name, I prevented the OS from word splitting file names when I view the ZIP's contents like so
When I try to do the same with the control file,
SECOND_Array() correctly outputs the file names in the control files but it also output the file sizes listed in the control file
and my array comparison (diff -q) fails.
I tried adding this bit of Awk() code to remove the file size field but it brings word splitting back!
How can I remove the file size info and prevent word splitting? Any ideas?
How to catch a two word keyword which may contain a new line(may include spaces or tab) in it.
for example there is a file a.txt.
$more a.txt
create view
as
(select from
.........
..........
( select
....
(
select
......
..
select only no (((
number
( select
end (12 Replies)
Hi All,
My requisite is to split a single column of phonemes seperated by spaces into multiple rows.
my input file is:
a
dh
u
th
a
qn
ch
A
v
U
r
k
my o/p should be like:
adhu a dh u (3 Replies)
Hello All,
I am trying to remove all tabspaces and all blankspaces from my file using sed & awk, but not getting proper code. Please help me out.
My file is like this (<b> means one blank space, <t> means one tab space)-
$ cat file
NARESH<b><b><b>KUMAR<t><t>PRADHAN... (3 Replies)
In POSIX shell, we don't have arrays, but we can iterate over a list like this:
#!/bin/sh
list="Fred Barney Wilma Betty"
for i in $list; do echo $i; done
Fred
Barney
Wilma
Betty
But let's say we want "Mr. Slate" in the list.
We know we can't just stick him in there like this:... (5 Replies)
I'm writing some software tests, & one of my test cases is to prevent an address space from closing a data file (file is closed & a new one opened every 15 minutes).
I can't remove or rename the file while it's being written to, any other ideas to prevent a file from being closed - or at least... (4 Replies)
Hi Experts,
I have a 2 GB flat file which have unicode field, some of them are blanks and its size is 4000 character. In the existing system SED command removes the spaces. Because of this field itself....it is taking almost three days to complete the file processing. I removed sed and... (0 Replies)
Greetings.
I am struggling with a shell script to make my life simpler, with a number of practical ways in which it could be used. I want to take a standard text file, and pull the 'n'th word from each line such as the first word from a text file.
I'm struggling to see how each line can be... (5 Replies)
We have EDP members will do some testing job in my system , but sometimes these process will generate some error to the system log or any file ( usually the members don't know the log is reached to this level ) , then make the system crashed , could suggest the way how can to prevent this problem ?... (2 Replies)