Search Results

Search: Posts Made By: akeenabawa
3,351
Posted By akeenabawa
That command doesn't work for me. It's pretty...
That command doesn't work for me. It's pretty much just copying OLD_FILE to NEW_FILE. But it turned out I needed the last two lines because the last line of the file is blank.
I found this sed...
3,351
Posted By akeenabawa
I ran that command sed '$d' OLD_FILE > NEW_FILE...
I ran that command
sed '$d' OLD_FILE > NEW_FILE and it just displays the OLD_FILE contents.
In other words I want to display everything up to the last line of the OLD_FILE but I don't know how many...
3,351
Posted By akeenabawa
Do you have to make an output file?
Do you have to make an output file?
3,351
Posted By akeenabawa
Removing last line from file
Hi, I searched the forums but could not find anything that was very useful. I am trying to remove the very last line from a file and display the rest of the file.
Is there a way to use cut and tail...
3,899
Posted By akeenabawa
Although the 'rm -i' command from vidyadhar85...
Although the 'rm -i' command from vidyadhar85 does work. I want it to display the directory contents one-by-one than ask me to delete.
I changed the 'FILESIZE=' to the new one posted by shamrock but...
3,899
Posted By akeenabawa
When i replace filesize=`ls -l | awk '$5=0'` ...
When i replace
filesize=`ls -l | awk '$5=0'`
with
FILESIZE="ls -l | awk $5 == 0"
I get an error this time. line 28: [: too many arguments
line 28 is the if [ $FILESIZE ]
3,899
Posted By akeenabawa
Filesize not working
I am having problems with finding the filesize with this in my script:

filesize=`ls -l | awk '$5=0'`

if [ -d $1 ]; then
ls -l | awk '{print $9 " " $5}'
if [ $filesize ]; then
...
2,988
Posted By akeenabawa
Search directories for files with zero sizes to delete
Hi,
I am trying to write a script that will use ls on a directory and list the files one at a time and their size. If the size is 0 i want it to ask me if I want to delete it (yes or no). If I say...
Showing results 1 to 8 of 8

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