9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Here's my code -
for File in "${Files}"; do
uuencode "${File}" "$(basename ${File} 2>&-)" 2>&-;
done | mailx -s "subject" "a@b.c"
Now I want to know if there a way to *not* send an email if the "Files" variables turns out to be blank. Any suggestions?
Also, just to clarify, I... (4 Replies)
Discussion started by: nexional
4 Replies
2. Shell Programming and Scripting
i have a nested if statement. i need to check for a condition (highlighted in red below). if condition is true, i need the if statement to break out of the statement and then return to the if statement section i have highlighted in blue.
is this possible?
if ; then
#return here
... (6 Replies)
Discussion started by: SkySmart
6 Replies
3. UNIX for Dummies Questions & Answers
hi,
My input is:
123
1234|123|123|123
123|123|456
123|123|12
12
Expected output is:
123
1234|123
123|123
123|123
456
123|123
12 (1 Reply)
Discussion started by: pandeesh
1 Replies
4. Shell Programming and Scripting
Hello. I'm making a (hopefully) simple shell script xml parser that outputs a file I can grep for information. I am writing it because I have yet to find a command line utility that can do this. If you know of one, please just stop now and tell me about it. Even better would be one I can input... (10 Replies)
Discussion started by: natedawg1013
10 Replies
5. Shell Programming and Scripting
Dear Friends,
Here I need your guidance once again.
I have for loop which check all files in a folder for a particular string. If the string is found in a file it returns value other than 0 else returns 0 value in variable t2.
At times the string which we are looking for is in first file... (1 Reply)
Discussion started by: anushree.a
1 Replies
6. Shell Programming and Scripting
I have a main script with while loop having for loop inside. Again in for loop based on if condition few functions will be called. So when a function is called for certain condition it should come out from the main for loop and should continue with while loop.
Let me explain with example here:
I... (6 Replies)
Discussion started by: vpv0002
6 Replies
7. Shell Programming and Scripting
Hi,
I have a file that looks like this - lets call it fileA
>hhm2
IIIIIIIIILLLLLLLMMMMMMMMMNNNNNNNNNNGGGGGGHHHHHHHH
>hhm4
OOOOOKKKKKKKKMMMMMHHHHHLLLLLLLLWWWWWWWWWWW
>hhm9
OOOOOOOIIIIIIIIIKKKKKKKKKMMMMMHHHHHHHHHHHLLLLLLLLLL
So the file is pretty straight forward. The name is indicated... (2 Replies)
Discussion started by: phil_heath
2 Replies
8. Shell Programming and Scripting
I have the following command in a Bash shell script:
who | grep -w $1 | some other commands
If grep fails, an error message is displayed. How do I test if grep fails and still be able to pipe it's output to the rest of the commands?
I have the following solution:
a=`who | grep -w $1`... (3 Replies)
Discussion started by: oinkl
3 Replies
9. Shell Programming and Scripting
Hi,
I need some help with breaking up a given line based on 'fixed width' file.
Something like this:
After the breaking up, I need to have this output format...
First line should have the first 134 characters.
Starting from second line, I should have one line every 61... (3 Replies)
Discussion started by: rputtagunta
3 Replies