Search Results

Search: Posts Made By: Bengel
1,727
Posted By Bengel
Thanks Dr. House - that works like a charm!
Thanks Dr. House - that works like a charm!
1,727
Posted By Bengel
Basic if statement problem
I am using the following code:
if [ $FILE = IMG* ]; then

I am getting an error saying line 12: [: too many arguments


The code is supposed to examine whether the filename read into $FILE...
3,024
Posted By Bengel
Sorry I take that back - your solution is...
Sorry I take that back - your solution is perfect!! I was going between versions and missed a couple of changes. I made them and it works!! Thank you so much!
3,024
Posted By Bengel
It sort of ran - I got the following error...
It sort of ran - I got the following error message:

./test.sh: line 12: [: -gt: unary operator expected
du: fts_open: No such file or directory

The output is on average a new directory for...
4,504
Posted By Bengel
Awesome, thanks!
Awesome, thanks!
3,024
Posted By Bengel
Both solutions sound great, but I'm still...
Both solutions sound great, but I'm still struggling with programming - where should I put the suggested code? I tried it in a couple of places and I can't get it to work right. For example:

...
3,024
Posted By Bengel
Sorting in Unix
Hi I'm writing a shell that goes through a bunch of files and does a simple test on each. Each file has a numeric name (ex. 100.jpg). My problem is that the shell is going through the files in...
4,504
Posted By Bengel
solution
Hi again, in case anyone was wondering I got a solution from a friend.

filesize=$(du $FILE | cut -c1-4)

My files are between 1 and 9 MG so there is always the same number of numbers.

Thanks...
4,504
Posted By Bengel
Hi you're right, I'm not getting a simple integer...
Hi you're right, I'm not getting a simple integer readout. I'm getting this:

$ du dsc03143.jpg
3784 dsc03143.jpg

I am extremely unfamiliar with the awk command and haven't been able to find a...
4,504
Posted By Bengel
Good suggestion - but I'm still getting the same...
Good suggestion - but I'm still getting the same error: "[: too many arguments"

Other suggestions? Am I trying to do too much in one if statement? Should I perhaps read the result of "du -sk...
4,504
Posted By Bengel
if statement code syntax
Hi, can someone please tell me what is wrong with this code? I just want it to check if the file size is greater than 2000kb.

if [ du -sk $FILE -gt 2000 ]

Thanks!

---------- Post updated at...
3,500
Posted By Bengel
installing Jpegsrc
Hi everyone, I am having trouble installing jpegsrc (and going by my internet searches this does not seem to be a particularly unusual problem!).

I am following the install.txt instructions for a...
2,620
Posted By Bengel
Using grep to compare JPEGs
Hi, I'm not sure if this is the right place but I'm a newb so it seemed right. I'm trying to write some code to organize JPEGs. Its a long story, but essentially, I need the program to tell me...
9,983
Posted By Bengel
Right! Much newbie thanks!
Right! Much newbie thanks!
9,983
Posted By Bengel
scottn believe it or not - you did fix it! It...
scottn believe it or not - you did fix it! It was sloppy code that was tripping it up.

I am trying to run this for a group of files (the parameters for the IF will soon change once I figure out...
9,983
Posted By Bengel
mv using variables
Hi I am trying to write a script that will do a test on a file name, and then move files in batches to newly created directories. For now I am testing it by having the script search for a single...
Showing results 1 to 16 of 16

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