Search Results

Search: Posts Made By: tumblez
13,440
Posted By tumblez
Using AWK to filter data from a file
I have a data file:

abc Text Text Text Unique Text
123 Text word Line Unique Text
fgh Text data Line Unique Text
789 Text Text Line Unique Text
543 Text Text Data Unique Text

and a...
3,394
Posted By tumblez
Well, I tried and tried, neither option seemed to...
Well, I tried and tried, neither option seemed to work, but then I noticed a line at the top of my Outlook window that said, "Extra line breaks in this message were removed.". I clicked on it and it...
2,373
Posted By tumblez
sort the file as shown will work
If the file is just the contents as you show and you want it to be sorted in reverse order, then...

cat file|sort -kr1,1
3,394
Posted By tumblez
Thank you for the response. That somewhat...
Thank you for the response.
That somewhat works for me, in that it allows me to send the file as an attachment, that can be opened with wordpad and looks just fine, but I want to have the contents...
3,394
Posted By tumblez
How to eliminate wrapped lines
I have a file abc:

line 1
line 2
line 3
line 4

And I am successfully e-mailing the file, with this:

mail -s "contents of abc" jdoe@email.com <<EOF
cat abc
EOF

But the e-mail shows up...
16,874
Posted By tumblez
This works... add_num () { for NUM in $1 ...
This works...

add_num () {
for NUM in $1
do
sum=`expr $sum + $NUM`
echo sum $sum
done
}


sum=0
add_num 1
add_num 2

and gives this result...

sum 1
sum 3
2,713
Posted By tumblez
If you are wanting the current system date in...
If you are wanting the current system date in that format...

date +"%Y%M%d"

will produce...

20070903
9,208
Posted By tumblez
How to use ps to display processor number
I'm on a Unix 5.2 server and I want to be able to see my processes to verify they are active and which processor they are running on.

ps -l will show me the status of process...
2,599
Posted By tumblez
setting a variable
In my script, I have the following command....

du -sk `ls -ltd sales12|awk '{print $11}'`|awk '{print $1}'

it returns the value

383283

I want to modify my script to capture that value...
5,773
Posted By tumblez
good idea
Good idea, I'll think about doing just that!
Thanks! :)
5,773
Posted By tumblez
I can do this that will produce a list of...
I can do this that will produce a list of directories from my main directory

list=`ls ?? ???|grep -E "P|T"`
echo $list
TRN UT:

I don't know why it shows the colon following the UT directory....
5,773
Posted By tumblez
your logic makes sense
Okay, the logic you show makes sense and should work for me.

I have a root directory called root. Within it there are 10 or so subdirectories each of varying size (in terms of name). Of those...
5,773
Posted By tumblez
that logic forces a break regardless if dir exists or not
First, my apology for starting a new thread. What I am attempting is if I choose a, and it exists, then I'm out of the case/esac loop. If I choose, b, which does not exist, then I want to stay in...
5,773
Posted By tumblez
attempting to break within function
Attempting to break from a case/esac paragraph while inside of a function. When executing the code below, entering the letter 'a', will prove that the directory exists, but the break command works...
24,392
Posted By tumblez
how to break within a case/esac and stay in script
Wrote the following loop to but if I use exit, then I break entirely from my script, but instead I want to break from the case/esac and go to the next line in my script. I guess I need to know how...
Showing results 1 to 15 of 15

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