01-27-2009
Quote:
Originally Posted by
shira
Please don't laugh at me.
Channel your enrgies to help me.
Oh no...I wasn't laughing at you...I thought perhaps you made a typo but I was too slow to reply to this thread and joey pointed out what we saw was obvious.
Could you post an example of what you see as different between the script output and the command line output?
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I'm having some trouble reading a file that was 'cat' through a while loop. Can anyone suggest alternatives? what i do is
cat filename|grep *.stuff
while read line
do
echo $line
... and other commands
done
The cat,grep line seems to work correctly, but the script hangs when i add in... (3 Replies)
Discussion started by: chugger06
3 Replies
2. Shell Programming and Scripting
I am writing a script that is running a loop on one file to obtain records from another file.
Using egrep, I am finding matching records in file b, then outputing feilds of both into another file.
****************************
filea=this.txt
fileb=that.txt
cat $filea | while read line
do... (1 Reply)
Discussion started by: djsal
1 Replies
3. UNIX for Dummies Questions & Answers
Hi
Can anybody tell the difference between Difference between cat , cat > , cat >> and touch command in UNIX?
Thanks (6 Replies)
Discussion started by: skyineyes
6 Replies
4. Shell Programming and Scripting
STEP 1
# Set variable
FILE=/tmp/mainfile
SEARCHFILE =/tmp/searchfile
# THIS IS THE MAIN FILE.
cat /tmp/mainfile
Interface Ethernet0/0 "outside", is up, line protocol is up
Hardware is i82546GB rev03, BW 100 Mbps
Full-Duplex(Full-duplex), 100 Mbps(100 Mbps)
MAC address... (6 Replies)
Discussion started by: irongeekio
6 Replies
5. Shell Programming and Scripting
Hi All,
version :-
SunOS rdrsu1 5.10 Generic_142900-12 sun4u sparc SUNW,SPARC-Enterprise
I have a requirenemet, where I have to extrace eroror start with ORA-, which match a perticular date. In below text I only extract out error coming on wed-8 and start with text like "ORA-". hope you... (4 Replies)
Discussion started by: alok.behria
4 Replies
6. Shell Programming and Scripting
Hi all,
I need to create loop script to read full line and append a variable to each line.
cat file
I need the output like below
10.0.0.1,136 1 24 048800 id N4 No_Light
10.0.0.1,137 1 25 048900 id N4 No_Light
10.0.0.1,140 1 28 048c00 id N4 No_Light
10.0.0.1,262 1 38 048e80... (13 Replies)
Discussion started by: ranjancom2000
13 Replies
7. AIX
hi Guys,
Am new to this awesome forum, and yea i need some help here asap thnx :)
i have a directory with over 34000 text files, i need a script that will delete the last line of each of this file without me necessary opening the files.
illustration:-
file1 200 records
file2 130 records... (5 Replies)
Discussion started by: eetang
5 Replies
8. UNIX for Beginners Questions & Answers
Here's my script
echo "1" >>hello.txt
echo "2" >>hello.txt
echo "3" >>hello.txt
mailx -s "Check Status" #myteam@mycomp.com<hello.txt In Outlook I see EMail body as
when I want it to be
can you please suggest ? (29 Replies)
Discussion started by: mohtashims
29 Replies
9. Shell Programming and Scripting
Hello, :)
I've an issue with the creation of a directory, All work without it :mad: So, below, my scripts with the debug output :
#!/bin/bash
# PATHS
HOME_BACKUP="/home/backup"
HOME_SCRIPT="/home/scripts/test/backup_server"
TARGET="/var/www"
# DATE
DATE_Ymd=$(date +%Y-%m-%d)
#... (1 Reply)
Discussion started by: Arnaudh78
1 Replies
diff3(1) General Commands Manual diff3(1)
NAME
diff3 - 3-way differential file comparison
SYNOPSIS
file1 file2 file3
DESCRIPTION
compares three versions of a file, and prints disagreeing ranges of text flagged with these codes:
all three files differ
file1 is different
file2 is different
file3 is different
The type of change required to convert a given range of a given file to some other is indicated in one of these ways:
Text is to be appended after line number
n1 in file f, where f = or
Text is to be changed in the range line
n1 through line n2. If n1 = n2, the range can be abbreviated to n1.
The original contents of the range follows immediately after a indication. When the contents of two files are identical, the contents of
the lower-numbered file is suppressed.
Produces a script for the
editor that can be used to incorporate into file1 all changes between file2 and file3 (see ed(1)); i.e., the changes that
normally would be flagged and
Produces a script to incorporate only changes flagged
Produces a script to incorporate only changes flagged
Produces a script that will incorporate all
changes between file2 and file3, but treat overlapping changes (that is, changes that would be flagged with in normal
listing) differently. The overlapping lines in both files will be inserted by the edit script bracketed by and lines.
Produces a script that will incorporate only changes flagged
, but treat these changes in the manner of option.
The following command applies the resulting script to file1.
EXTERNAL INFLUENCES
International Code Set Support
Single- and multi-byte character code sets are supported.
WARNINGS
Text lines that consist of a single period defeat
Files longer than 64K bytes do not work.
FILES
SEE ALSO
diff(1).
diff3(1)