10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Using the 'strings' command and piping the result to 'sort' is producing strange results. I get block of lines that begin with asterisks, then a block that begins with some text, then more lines that begin with asterisks. The actual content is correct - lines beginning with asterisks is the... (5 Replies)
Discussion started by: edstevens
5 Replies
2. UNIX for Beginners Questions & Answers
Could you please advise on the following: I have two space-delimited files with 9 and 10 columns, respectively, with exactly the same values in column 1. However, the order of column 1 differs between the two files, so I want to sort both files by column 1, so that I can align them and... (6 Replies)
Discussion started by: aberg
6 Replies
3. UNIX for Beginners Questions & Answers
Hi Folks -
I have this file that looks like this:
outbox/logs/Client_1042.log
outbox/logs/Client_941.log
outbox/logs/Client_942.log
outbox/logs/Client_943.log
outbox/logs/Client_944.log
And this is my code:
#!/bin/bash
_OUTBOX_BIN="outbox/logs/"
_NAME="Client"
_TEMP="temp.txt"... (9 Replies)
Discussion started by: SIMMS7400
9 Replies
4. UNIX for Beginners Questions & Answers
Hello and thanks in advance for any help anyone can offer me
I'm trying to learn the find command and thought I was understanding it... Apparently I was wrong. I was doing compound searches and I started getting weird results with the -size test. I was trying to do a search on a 1G file owned by... (14 Replies)
Discussion started by: bodisha
14 Replies
5. UNIX for Dummies Questions & Answers
Hi,
Am running the command below to search for files that contains a certain string.
grep -il "shutdown" `find . -type f -mtime -1 -print` | grep "^./scripts/active"
How do I get it to do a ls -l on the list of files? I tried doing ls -l `grep -il "shutdown" `find . -type f -mtime -1... (5 Replies)
Discussion started by: newbie_01
5 Replies
6. UNIX for Dummies Questions & Answers
I am trying to sort a file . The file looks like this:
DDFF 2 /ztpfrepos/pgr/load
DDFQ 2 /ztpfrepos/pgr/load
DDFX 2 /ztpfrepos/pgr/load
DDUA 2 /ztpfrepos/pgr/load
My command:
sort -k1 /home/c153507/Bin/OPL1.txt -o /home/c153507/Bin/OPL1.txt
The results are OK except for one line where... (4 Replies)
Discussion started by: Yahalom
4 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have a problem with a shell script.
The script should find all .cpp and .h files and list them.
With:
for file in `find $src -name '*.h' -o -name '*.cpp'
it gives out this:
H:\FileList\A\E\F\G\newCppFile.cpp
H:\FileList\header01.h
H:\FileList\B\nextCppFile.cpp
... (4 Replies)
Discussion started by: shellBeginner75
4 Replies
8. Shell Programming and Scripting
Here is the code, but the list is not sorted properly (alphabetically)?
<?php
function folderlist(){
$startdir = './';
$ignoredDirectory = '.';
$ignoredDirectory = '..';
if (is_dir($startdir)){
if ($dh = opendir($startdir)){
while (($folder = readdir($dh)) !== false){
if... (0 Replies)
Discussion started by: mrlayance
0 Replies
9. Shell Programming and Scripting
Hi All
I have a flat text file. Each line in it contains a "/full path/filename". The last three columns are predictable, but directory depth of each line varies.
I want to sort on the last three columns, starting from the last, 2nd last and 3rd last. In that order. The last three columns... (6 Replies)
Discussion started by: JakeKatz
6 Replies
10. UNIX for Dummies Questions & Answers
Hi,
how can I get only useful results from
find / -size 10000000
without the "Permissions denied" files ?
tks
C (5 Replies)
Discussion started by: Carmen123
5 Replies