Search Results

Search: Posts Made By: jrymer
1,630
Posted By jrymer
Find with the proper options give me the correct...
Find with the proper options give me the correct list of files, confirmed by ls -l. Is there another way to rm the files without moving them to a starting directory?
1,630
Posted By jrymer
Crontab issue
Hello,

I have a bash script that finds files older than 31 days and deletes them. I have this file loading into crontab to run everyday. It ran fine the first time i loaded it in, but now when I...
6,400
Posted By jrymer
I wrote an html script, only html, to produce the...
I wrote an html script, only html, to produce the output I want, and am now implementing parts of that code into my perl script. The first image is what my output will hopefully look like after...
6,400
Posted By jrymer
Writing an HTML file in perl
I'm writing a perl script that writes an html file.

use Tie::File;

my ($dir) = @ARGV;

open (HTML,">","$dir/file.html") || die $!;

#-----Building HTML file---------------------------...
2,671
Posted By jrymer
I don't typically write in bash so there are...
I don't typically write in bash so there are probably a lot of errors but if you could help me with the multiple variable user input that would help!

#Location variables

TIME=" -maxdepth 1...
2,671
Posted By jrymer
Capturing multiple values from user input
Hello,

I need to capture multiple values from user input and do not know how to do it. I'm writing a script to delete old files, but want to give the option to keep some by asking the user.
...
6,721
Posted By jrymer
I'm new at bash, and do not understand some of...
I'm new at bash, and do not understand some of your code.

What is the
[..]
[..]
in the for loop?

I'm assuming its like an if? Saying if X=Y then make found=1?
6,721
Posted By jrymer
Add value to end of array
I'm trying to expand my array by adding another value onto the end of it, thus adding a new index and upping the length of the array by one. I am iterating through two arrays, and trying to get one...
20,345
Posted By jrymer
I got it working, I was complicating things WAY...
I got it working, I was complicating things WAY too much. I think I made an error earlier on while testing it that led me to skip over the solution.

This does what I need.
j=1
for i in...
20,345
Posted By jrymer
@rdrtx1 I changed the permissions and got it...
@rdrtx1
I changed the permissions and got it run but it produces the incorrect output, if it finds one file it prints one newline, if two files are found it prints two newlines etc. Also I fail to...
20,345
Posted By jrymer
It says /dir1/file1: Permission denied, I put...
It says /dir1/file1: Permission denied, I put sudo before it as well.
20,345
Posted By jrymer
Parse find input into array
I need help parsing the output of find into an array. I need to search 3 directories and find all files older than 31 days old. This is what I have so far.

TIME=" -maxdepth 1 -mtime +31"...
1,834
Posted By jrymer
It did not work. When I run sff extract I get...
It did not work. When I run sff extract I get something like file.MID38.fastq which is why I think it did not work, at first I was getting an error saying that it was not a directory. I removed the ...
1,834
Posted By jrymer
Using multiple pipe output
I have a script that finds all sffs and extracts them into .fastq file types. What I need to do is change the .fastq to .fasta using the below script. How can I change the input.fastq and...
1,782
Posted By jrymer
Thanks I just thought it looked as though I could...
Thanks I just thought it looked as though I could get errors if conditions changed.
1,782
Posted By jrymer
Piping multiple commands
Using the below code I want to find all .sff files and extract them. This works but it seems very cheap. Is there a safer more efficient way to go about this?

#!/bin/bash

G1=(/home/dirone)
...
1,225
Posted By jrymer
Thanks neutronscott it worked, can you explain in...
Thanks neutronscott it worked, can you explain in a little more detail what your code does though? I am unfamiliar with printf, this section was hardest to read.
I understand it for the most...
1,225
Posted By jrymer
Archive won't move
I' writing a script trying to archive the oldest two directories from one place, tar them, and move them to another.

#!/bin/bash

cd (/dir/with/dirforarchiving)
ARCHIVE=(/temp/dir/)...
8,845
Posted By jrymer
printing array elements
Is there a way to print multiple array elements without iterating through the array using bash?

Can you do something like...

echo ${array[1 2 3 4 5]}and get all those separate elements from...
2,420
Posted By jrymer
Checking if multiple directories exist
I need to create multiple directories if those directories do not exist already. How would you go by doing this.

What I have so far.


array=(one two three)

for I in ${array[@]}
do
if...
2,613
Posted By jrymer
Yea I realized that after an hour of trying, felt...
Yea I realized that after an hour of trying, felt really stupid afterwards -_____-
2,613
Posted By jrymer
Creating an array
I am having trouble creating an array, I've tried everything google gives me but it won't work, and it seems as though it should. Using Ubunto 12.04 and bash.

#!/bin/bash
ARRAY=one two three...
2,717
Posted By jrymer
touch modifies the file's timestamp. Look here...
touch modifies the file's timestamp.
Look here

UNIX man pages : touch () (http://unixhelp.ed.ac.uk/CGI/man-cgi?touch)
1,607
Posted By jrymer
Proper syntax
I'm new to Unix, and just had a quick question.

I'm writing a bash script, and I was wondering what proper programming etiquette was for piping. How many pipes is too many pipes?

OLDEST=$(find...
1,946
Posted By jrymer
I changed the -type d to -type f and that did the...
I changed the -type d to -type f and that did the trick, grabbing the directory and everything in it.
Showing results 1 to 25 of 32

 
All times are GMT -4. The time now is 11:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy