10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to parse a text file and send its output to another file but I am having trouble conceptualizing how I am supposed to do this in awk.
The text file has a organization like so:
Name
Date
Status
Location (city, state, zip fields)
Where each of these is on a separate line in... (1 Reply)
Discussion started by: kellyanneghj
1 Replies
2. Shell Programming and Scripting
I cannot get the code below to work correctly. The IF statement works just fine, but not the looping. The inner loop tries to find files for a given vendor; if found, I need to sleep giving another process time to move the files. Once the given vendor's files are gone, then I want to move on to the... (1 Reply)
Discussion started by: dgreene
1 Replies
3. Shell Programming and Scripting
Hello all,
I am writing up an input file and I was hoping I could get some guidance as to how to best consolidate these 2 awk statements for 1 while loop.
Here's my input file
# cat databases.lst
#NOTE: These entries are delimited by tabs "\t"
#oracleSID name/pass
#
db11 ... (2 Replies)
Discussion started by: Keepcase
2 Replies
4. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I need to write a script that accepts 3 filenames as command line parameters and test if they are executable and... (1 Reply)
Discussion started by: tommynewb
1 Replies
5. UNIX for Dummies Questions & Answers
Here's the input:
alpha, numeric or alphanumeric string ("line 1 string")
numeric string ("line 2 string")
numeric string ("line 3 string")
numeric string ("line 4 string")
...
where
- each numeric string is in a pattern that can be matched with RE but
- there can be any number of... (2 Replies)
Discussion started by: uiop44
2 Replies
6. Shell Programming and Scripting
Just started learning bash ,and I am confused with sintaksis
line 16: syntax error near unexpected token `else'
thanks
#!/bin/bash
echo -n "Enter: "
read num
if(($(echo ${#num}) == 0 ))
then
echo No arguments passed.Try again
elif
rem=$(echo $num | tr -d )
... (7 Replies)
Discussion started by: lio123
7 Replies
7. UNIX for Dummies Questions & Answers
if ]; then
if ]; then
rm -f ${LOGFILE}.old
fi
mv ${LOGFILE} ${LOGFILE}.old
fi
Havent done nested ifs in a while. I'm reading someones code If I'm reading this correctly. It checks for the logfile, and if it exists it checks for the old logfile and if that exists, it removes the... (8 Replies)
Discussion started by: NycUnxer
8 Replies
8. Shell Programming and Scripting
This is my requirement--
I have a list file that contains a list of 50 words.
eg
word1
word2
word3
I want to search/grep for each of those words in a directory/and subdirectories and list the file in which that word exists.
Ne ideas for script/command?
I know grep -r <pattern>... (3 Replies)
Discussion started by: alfredo123
3 Replies
9. Shell Programming and Scripting
Hi,
I have series of data stored in a variable xyz:
(between 0 and 100)
example:
20 45 98 21.....
I need to find if there is/are any occurance of data > 95
Not sure what kind of looping is required to check.
Please help.
thanks (2 Replies)
Discussion started by: hemangjani
2 Replies
10. UNIX for Dummies Questions & Answers
I am writing a simple script and want to keep the user in a fuction until they are ready to get out. For some (probably stupid) reason, it doesn't seem to be working. You guys see anything that I'm overlooking?
crsd()
{until
do
/home/wcs3611.crsdtmp.sh
echo 'run another? \c'
... (1 Reply)
Discussion started by: hedrict
1 Replies