10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to use grep to find files that have newlines in the filename. For example, I have a directory where I create three files:
$ touch file1
$ touch "file 2"
$ touch "file
> with
> newlines"
$ find
.
./file 2
./file1
./file?with?newlinesI now want to pipe the find output into grep and... (4 Replies)
Discussion started by: Ralph
4 Replies
2. Shell Programming and Scripting
Hi,
I am writing an ebuild for Gentoo Linux operating system.
Writing an ebuild is about Bash scripting where I am a newbie.
So, my ebuild must find a part of a specific filename.
Such a filaname my look like this:
libvclient_release_x64.so.740and I must to find the number at the and of... (18 Replies)
Discussion started by: csanyipal
18 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I have been trying , to find the filename based on some pattern present inside the file
My command is as follows:
filename=`grep -l 'Pattern' path/*.txt `
Its strange that it works some times, but doesn't print anything some times .
But my if test -f $filename is passing all the... (2 Replies)
Discussion started by: Prashanth19
2 Replies
4. UNIX for Dummies Questions & Answers
Hi,
We are receiving an XML file in Unix which has some special characters between tags like '^' etc
<Tag> 1e^O7f%<2304e.$d8f57e8^Bf-&e.^Zh7/327e^O7 </Tag>
We need to remove all special characters like ^ ones and also any '&' or '<' or '>' being sent within the start and close tags i.e.... (6 Replies)
Discussion started by: dsrookie7
6 Replies
5. Shell Programming and Scripting
Hi,
I have files named as
energy.dat.1
energy.dat.2
energy.dat.3
...
energy.dat.2342
I would like to find the file with maximum number in the filename (ex. energy.dat.2342) and open it.
Would you please share your expertize in writing the script?
Thanks in advance. (8 Replies)
Discussion started by: rpd25
8 Replies
6. UNIX for Dummies Questions & Answers
Hi, I have a series of files (upwards of 500) the filename format is as follows
CC10-1234P1999.WGS84.p190, all in one directory.
Now the last three numeric characters, in this case 999, can be anything from 001 to 999.
I need to move some of them to a seperate directory, the ones I need to... (5 Replies)
Discussion started by: roche.j.mike
5 Replies
7. Shell Programming and Scripting
hi all,
i'm trying to find out how to show files having a particular format. i.e.
files
o570345.out
o5703451.out
XX_570345_1.RTF
so when i search for files using
ls *570345*
it shows all three files but actually i don't like to see the second file o5703451.out because 5703451 is... (6 Replies)
Discussion started by: adshocker
6 Replies
8. Shell Programming and Scripting
Hi,
I have a Master file (file.txt) with good and bad records( records with unicode characters). I ahve a file with only bad records (bad.txt)
I want the records in file.txt which are not present in bad.txt ie only the good records.
I tried comm -23 file.txt bad.txt
It is giving... (14 Replies)
Discussion started by: ashwin3086
14 Replies
9. Shell Programming and Scripting
Hi all,
I have a list of xml file. I need to split the files to a different files when see the <ko> tag.
The list of filename are
B20090908.1100-20090908.1200_CDMA=1,NO=2,SITE=3.xml
B20090908.1200-20090908.1300_CDMA=1,NO=2,SITE=3.xml
B20090908.1300-20090908.1400_CDMA=1,NO=2,SITE=3.xml
... (3 Replies)
Discussion started by: natalie23
3 Replies
10. Programming
I have a stream of characters like "\u8BBE\u5907\u7BA1"
and i want to display it.
I tried following things already without any luck.
1) printf("%s",L("\u8BBE\u5907\u7BA1"));
2) printf("%lc",0x8BBE);
3) setlocale followed by fwide followed by wprintf
4) also changed the local manually... (3 Replies)
Discussion started by: jackdorso
3 Replies