Hi, I need to join these statements for efficiency, and without having to make a new directory for each batch. I'm annotating commands below.
Thanks in advance for direction.
If the commands:
produce the output you want in third.txt after running the command:
what is the difference between third.txt and fourth.txt after you also run:
? Are any diagnostic messages produced by either of these sets of commands? If so, exactly what are those diagnostic messages?
Hi, thanks for responding:
Linux Mint 18.1
GNU bash, version 4.3.46(1)-release (x86_64-pc-linux-gnu)
The results are identical in the example you suggested, no errors.
wget's -O - option doesn't work in recursive mode, so how to feed wget output to the grep statement programmatically, without grep reading every previously-wget'd folder in the local directory? (Which is what is happening now.)
According to the wget man page, old versions (before version 1.11) and new versions of wget (version 1.11.2 and later, although it may issue a warning in this case) should work just fine with:
This User Gave Thanks to Don Cragun For This Post:
...and this yields an empty file in its own directory (or grabs all previous wget'd folders in shared directory--see my post above):
So the problem persists as mentioned in my post above, that grep is not getting the wget I'm trying to attach to it. When the URL is downloaded, it creates a folder with many files, so I can see why outputting everything to an .html file (or any single file) is not going to work. Even if it did work, it's not getting piped to the grep statement, because executed in a directory with other previously wget'd URL's, the script is extracting info from all those other folders. So I need the script to access only the wget'd folder in the current command. I can do this by creating a new directory (I know, I'm repeating myself...), but I'd like to do it in the same directory.
for example, I have a text file in random content inside, maybe something like this.
234234
54654
123134
467456
24234234
7867867
23424
568567if I run this command
cat "filename.txt" | sort -n | grep "^467456$" -A 1 -B 1the result is
234234
467456
568567is it possible to do this command... (2 Replies)
I'm new using Unix commands in applescript. The following script you choose different folders with PDfs, get file count of PDfs on chosen folders, & write the results in text file.
set target_folder to choose folder with prompt "Choose target folders containing only PDFs to count files" with... (0 Replies)
I am downloading numerous files (600 plus) using a 'wget' script. Some files are not downloading and have zero byte size. I am using the following 'find' command to find the files in my cd which have non-zero byte size after the wget script has been run.
find -type f -size +0 -exec basename {}... (3 Replies)
Hi,
I am using a linux with bash.
I have a script written which will login to a remote server and from there it runs a "wget" to downlaod a build file from a webserver.
Here is the line inside the script:
ssh -t -q -o StrictHostKeyChecking=no -o ConnectTimeout=5 root@${a}'wget... (4 Replies)
I have a txt file with data
abc:def:ghi:jkl:mno pq stu vwx
I want to take out abc what should i do?
I try awk
awk '/abc/ {print $1}' listfile.txt> extendedfile.txt (5 Replies)
Hi,
I would like to know if this is possible, and if so what can i do to make this work.
I would like to grep a line X from fileA and then use the output to replace a word Y in fileB.
grep "line X" fileA | sed -e 's/Y/X/g' > outfile
this statement does not work, as i do not know how to... (7 Replies)
Haven't worked in bash for ages. did a good bit of shell scripting in regular sh, but have forgotten most of it.
I have several thousand php files that now include the following line at the end of the file. There is no LF or CR/LF before it begins, it is just concatenated to the final line of... (3 Replies)
ok.
i am doing a project where i have hand typed in the titles of nearly 500 DVD titles, each one is on a seperate line.
but they arent in any type of alphebetical order, and i need them sorted in that format (A-Z or a-z) .....
i know that the 'sort' command can be used but also know the... (6 Replies)