10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I am using Solaris 5.10 & ksh
Wanted to loop through a pattern file by reading it and passing it to the awk to match that value present in column 1 of rawdata.txt , if so print column 1 & 2 in to Avlblpatterns.txt. Using the following code but it seems some mistakes and it is running for... (2 Replies)
Discussion started by: ananan
2 Replies
2. Shell Programming and Scripting
Hi all,
I am trying to modify an xml file and I wanted to search and replace using the sed command but here is my issue. I want to search and replace maximumHeapSize="512" and replace it with maximumHeapSize="768" but I have multiple files with different values so I can't search for... (2 Replies)
Discussion started by: reyes99
2 Replies
3. Shell Programming and Scripting
I want to search a field and print first field in these record. There is a "*" in the field I want to search, like "TRBD2*01".
I used the command like this:
awk '/TRBD2*01/ {print $1}' test.txt
But it doesn't work. The command line
awk '/TRBD2/ {print $1}' test.txt
will work.
How... (4 Replies)
Discussion started by: xshang
4 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
Hi,
I have a file that contains the following contents:
14:05 apple
orange123
456mango
16:45 banana
I wanted to replace ONLY the "14:05 " and "16:45" with nothing and trying to use the following syntax
sed -e 's/*//g' -e 's/^: //g' my_file > new_temp
cat new_temp
apple
orange... (2 Replies)
Discussion started by: ghazi
2 Replies
6. 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
7. UNIX Desktop Questions & Answers
From time to time I need to extract portions of a very large weblogic log file.
Each line in the file begins with a date stamp like this:
####<Dec 26, 2005 10:58:30 PM CST>
What would be the most efficient way to select all lines in the file between, say, 10:15 PM and 10:20 PM? (1 Reply)
Discussion started by: kf199
1 Replies
8. Shell Programming and Scripting
I have an array of hashrefs that look like the following:
my @LAYOUT = (
{SQL_1 => "select count (*) FROM prospect
WHERE PROCESS_DATE = To_date('INSERT_DATE_HERE', 'mm/dd/yyyy')
and tiff_filename is not null
... (2 Replies)
Discussion started by: kregh99
2 Replies
9. Shell Programming and Scripting
Hi,
I'm having some trouble with the syntax in constructing a simple nested 'for' loop.
My code is as follows:
#!/bin/bash
dir1="fred flume haystack"
for dir2 in ${dir1}
do
fred="1 2 3"
flume="a b c"
... (7 Replies)
Discussion started by: Sn33R
7 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