10 More Discussions You Might Find Interesting
1. UNIX Desktop Questions & Answers
Dear All,
I have many sub-folders but each of them have a file with same name but different data.
I want to either move or copy them into a new folder but they need to have the path of where they are coming as part of their name...
I have managed to find the files but dont know how to change... (2 Replies)
Discussion started by: A-V
2 Replies
2. Shell Programming and Scripting
This is my file
.........hostname.............this is hostname
.........alias...................alias name
Remark use dot(.) instead of whitespace B'cuz this forum not allow to use more whitespace.
---------------------------------------
I sperate by whitespace not work.
awk 'BEGIN {FS=" "}... (4 Replies)
Discussion started by: cyberking
4 Replies
3. Shell Programming and Scripting
I have two files:
file-gene_families.txt that contains 30,000 rows of 30 columns. Column 1 is the ID column and contains the
Col1 Col2 Col3 ...
One gene-encoded CBPs ABC 111 ...
One gene-encoded CBPs ABC 222 ...
One gene-encoded CBPs ABC 212 ...
Two gene encoded CBPs EFC... (7 Replies)
Discussion started by: yifangt
7 Replies
4. UNIX for Dummies Questions & Answers
Howdy Folks,
I have a list that looks like this:
(file2.txt)
AAA
BBB
CCC
DDD
and there are 24 of these short words.
I am matching these patterns to another file with 755795 lines (file1.txt).
I have this code for matching:
awk -v f2=file2.txt '
BEGIN {
while(... (2 Replies)
Discussion started by: heecha
2 Replies
5. Shell Programming and Scripting
Hi
Following is an example line.
echo "192.22.22.22 \"33dffwef\" 200 300 dsdsd" | sed "s:\(\ *\ \):\1:"
I want it's output to be
200
However this is not the case. Can you tell me how to do it? I don't want to use AWK for this. Secondly, how can i fetch just 300? Should I use "\2"... (3 Replies)
Discussion started by: shahanali
3 Replies
6. Solaris
Hi all
Right, Im a little bit thick when it comes to SAN :-) IVe got a dual port qlc in a solaris 10 server. Its all connected and I can see a number of disks. The SAN guy here has asked me about preferred paths, i.e. as the dual ports are connected to two fabrics, etc device will have 4... (2 Replies)
Discussion started by: sbk1972
2 Replies
7. Shell Programming and Scripting
Hi,
I have a for loop which iterates over a list of strings, separated by whitespace:
$ list="1 2 3"
$ for i in $list; do echo $i; done
1
2
3
I now want to introduce some strings containing whitespace themselves ... This is straightforward if I directly iterate over the list:
$ for... (4 Replies)
Discussion started by: kkkoehne
4 Replies
8. Shell Programming and Scripting
I'm trying to search all .odt files in a directory for a string in the text of the file.
I've found a bash script that works, except that it can't handle whitespace in the filenames.
#!/bin/bash
if ; then
echo "Usage: searchodt searchterm"
exit 1
fi
for file in $(ls *.odt); do
... (4 Replies)
Discussion started by: triplemaya
4 Replies
9. Shell Programming and Scripting
I obviously haven't learned my lesson with shell and whitespace.
find /path/to/some/where/ -name "*.pdf" | awk '{print $5}'| uniq -d
results:
some Corporation
other Corporate junk
firmx
Works fine from cmdline but the whitespace turns into another FS in a for loop.
for... (7 Replies)
Discussion started by: s_becker
7 Replies
10. Shell Programming and Scripting
Hi all,
I've been trying to get this to work for ages to no avail. I've searched this site and googled but cannot find a satisfactory answer.
I've got a while loop, like this
while read line
do
echo "$line"
done < file_name
Now, my problem is that most of the lines in the file... (3 Replies)
Discussion started by: zazzybob
3 Replies