Hi, I have updated the script to ksh and added the set -x. Thanks a lot for that. However still facing errrors, as expected . I have pasted the output also
I have the following line in file1
elif ; then
now if i try to grep this using following command
grep -e "elif ; then" file1
it is showing nothing...
how to grep such patterns (2 Replies)
Hi, I've trouble getting some numbers from a html-file. The thing is that I have several html-logs that contains lines like this:
nerdnerd, how_old_r_u:45782<br>APPLY: <hour_second> Verification succeded
This is some of what I've extracted from a html file but all I really want is the number... (7 Replies)
Hi All,
Below is my code,what I am trying to do is redirecting output of ftp to a log file & then greping the errors but here I am unable to grep "Permission denied" error only & also the corresponding log file is also not getting created.
#!/bin/sh
. cfg
USER='abc'
PASSWD='abc123'
... (4 Replies)
Hi All,
We have a shell script(ODS_Load)which loads the data from perticular flat file to oracle table invoking sqlplus based on the parameter.
When we execute the script(ODS_Load) independently, script is working fine and able to load the tables successfully.
We invoke(ODS_Load) with... (1 Reply)
Hi All,
I am trying to select all files in a directory which are not with .gz extension .
for which I am using below script ,
but its rejecting both .gz and .z extension files,as in each letter is considered separately.
PFB
ls -lrt | awk '{print $9}'| egrep "^IRAMS.*$"
please suggest... (1 Reply)
hi all,
i have a data sm thg like this
28504 0 abc 148782859 42 101M nhmmmm ilopo abc 2345432
i want to get only the field which is just aftr abc i,e., 148782859, 2345432
i have used grep /abc\t/ filename to get that but its not working can any 1 help me out (5 Replies)
I have a file with 2 lines of code
Rome is in Romeo
Romeo is in Rome
How do I grep, so that only last line would be the outcome.
sample output
Romeo is in Rome
I have tried with all possible greps but its resulting in both the lines in output.
Please help. (6 Replies)
I have user1 run a script called logginexpert.sh while has this line of code
sleep 888I then login to another putty session with another user2 and try to grep for the logginexpert.sh process using
ps -ef | grep exSunOS mymac 5.11 11.2 sun4u sparc SUNW,SPARC-Enterprise
But, i dont get any... (20 Replies)
I wish to check if my file has a line that does not start with '#' and has
1. Listen and 2. 443
echo "Listen 443" > test.out
grep 'Listen *443' test.out | grep -v '#'
Listen 443
The above worked fine but when the entry changes to the below the grep fails... (2 Replies)
Discussion started by: mohtashims
2 Replies
LEARN ABOUT SUNOS
echo
echo(1B) SunOS/BSD Compatibility Package Commands echo(1B)NAME
echo - echo arguments to standard output
SYNOPSIS
/usr/ucb/echo [-n] [argument]
DESCRIPTION
echo writes its arguments, separated by BLANKs and terminated by a NEWLINE, to the standard output.
echo is useful for producing diagnostics in command files and for sending known data into a pipe, and for displaying the contents of envi-
ronment variables.
For example, you can use echo to determine how many subdirectories below the root directory (/) is your current directory, as follows:
o echo your current-working-directory's full pathname
o pipe the output through tr to translate the path's embedded slash-characters into space-characters
o pipe that output through wc -w for a count of the names in your path.
example% /usr/bin/echo "echo $PWD | tr '/' ' ' | wc -w"
See tr(1) and wc(1) for their functionality.
The shells csh(1), ksh(1), and sh(1), each have an echo built-in command, which, by default, will have precedence, and will be invoked if
the user calls echo without a full pathname. /usr/ucb/echo and csh's echo() have an -n option, but do not understand back-slashed escape
characters. sh's echo(), ksh's echo(), and /usr/bin/echo, on the other hand, understand the black-slashed escape characters, and ksh's
echo() also understands a as the audible bell character; however, these commands do not have an -n option.
OPTIONS -n Do not add the NEWLINE to the output.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWscpu |
+-----------------------------+-----------------------------+
SEE ALSO csh(1), echo(1), ksh(1), sh(1), tr(1), wc(1), attributes(5)NOTES
The -n option is a transition aid for BSD applications, and may not be supported in future releases.
SunOS 5.10 3 Aug 1994 echo(1B)