10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
// AIX 6.1
What I am trying to accomplish is to display the user name and the last login date and time in one line:
for usrlist in $(cat alluser.txt)
do
$usrlist
perl -e 'print scalar localtime `lsuser -a time_last_login $usrlist | awk -F '=' '{print $2}'`'
done
However, it... (8 Replies)
Discussion started by: Daniel Gate
8 Replies
2. Shell Programming and Scripting
Hi,
i want find the character '-' in a file from position 284-298, if it occurs i need to replace it with 'O ' for the position in the file. How to do that using SED command.
thanks in advance,
Sara (9 Replies)
Discussion started by: Sara183
9 Replies
3. UNIX for Dummies Questions & Answers
I want to create an IF condition with multiple condition, in the statement below I want to add OR EOF, can any one please advise how to do.
if } != $sample ] && ; then
echo .....
fi
code tags please (1 Reply)
Discussion started by: analyst
1 Replies
4. Shell Programming and Scripting
Hi all,
Can any one explain the usage of EOF in shell scripting??
Gone through some examples from google, but it is not clear...
Examples are:
1.
$ tr << EOF
> abcd
> efgh
> iojk
> EOF
O/P is:
ABCD
EFGH
IOJK
2.
echo << EOF (1 Reply)
Discussion started by: divya bandipotu
1 Replies
5. Shell Programming and Scripting
Hi Team,
i have 1st cloumn of data containing,
LAMSBA01-BA-COFF-YTD
LAMSBA01-BA-COFF-ITD
LAMSBA01-BA-AGGR-IND .
LAMSBA01-BA-CURR-COFF-BAL
i need to replace the "-" to "_" (underscore) using AWK .
please help me on this.
Thanks,
Baski (4 Replies)
Discussion started by: baskivs
4 Replies
6. Shell Programming and Scripting
Hi folks
I m creating script which is give me below error.
$ ./function.ksh
./function.ksh: here document `EOF' unclosed
Inside the script is
#!/bin/ksh
export ORACLE_SID=OECDV1
export ORACLE_HOME=/u01/app/oracle/product/10.2.0
export PATH=$ORACLE_HOME/bin:$PATH
echo "sql is... (3 Replies)
Discussion started by: tapia
3 Replies
7. Shell Programming and Scripting
Hi Experts,
Is there a way to find whether a file contains ^M character in it?. It's quite obvious to vi, but can this be accomplished using an automated way to find recursively in a directory.
probably i guess the best way would be to
1) Read the file and check if the end of line is ^M... (8 Replies)
Discussion started by: ganga.dharan
8 Replies
8. Shell Programming and Scripting
Hi friends ,
I am confused with << EOF
EOF
Most of the cases I found
sqlplus $db_conn_str << EOF
some sql staments
EOF
another exapmle is
#!/bin/sh
echo -n 'what is the value? '
read value
sed 's/XXX/'$value'/' <<EOF
The value is XXX
EOF (1 Reply)
Discussion started by: imipsita.rath
1 Replies
9. Shell Programming and Scripting
Hi,
I need to check whether one file has EOF or not.
There's one daemon in our system, which will pick the files FTPed to us. However, sometimes the daemon picks the file before FTP is finished.
So I'm planning to add some checking of EOF on the FTPed files in the shell script.
Could... (8 Replies)
Discussion started by: ideazhcy
8 Replies
10. Shell Programming and Scripting
Newbie question. I want to create a shell script that will only move/copy a file if it's determined that the eof string exists. This is to control files being uploaded via FTP. I don't want to move incomplete files, so my only thought is to check for eof, or compare file size every 15-30 seconds on... (12 Replies)
Discussion started by: mfilby
12 Replies