10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am using this line of perl code to change the file format and remove ^M at the end of each line in files:
perl -i -pe's/\r$//;' <name of file here>
Can you explain to me what this code does, and translate it into bash/awk/sed? (2 Replies)
Discussion started by: locoroco
2 Replies
2. Shell Programming and Scripting
Hi friends,
I am new to UNIX.
I going to transfer files using SFTP. I am writing a script and using mget .
If i am using mget * means,
if all the files and their sub directories are transferred or not?
If suppose , the local system dose not have the sub directory then what will... (1 Reply)
Discussion started by: punitha
1 Replies
3. Shell Programming and Scripting
Hi Unix Gurus,
Please explain the processing done by the code mentioned below:
for (i=1;i<=59;i++)
{
sub(/ *$/,"", $i)
}
newrec_key = $2
new_line = $0
if (empty_oldfile==1)
{
#newly added record
++num_add
print "Added key: ", newrec_key > LogFile
#print out... (4 Replies)
Discussion started by: ustechie
4 Replies
4. Shell Programming and Scripting
How to print a only files and not directories in a path.
for exam :a user consists both files and directoris in his path.
i have to write a script to display only files not dirctories.
and only dirctories not files.
Advance thanks to forum members.:) (5 Replies)
Discussion started by: sivaranga001
5 Replies
5. Shell Programming and Scripting
CODE
file=/tmp/rap54ibs2sap.txt
trap "rm $file; exit" 0 1 2 3 15
trap
rm $file
execution result
trap -- 'rm /tmp/rap54ibs2sap.txt; exit' EXIT
trap -- 'rm /tmp/rap54ibs2sap.txt; exit' SIGHUP
trap -- 'rm /tmp/rap54ibs2sap.txt; exit' SIGINT
trap -- 'rm /tmp/rap54ibs2sap.txt;... (1 Reply)
Discussion started by: rrd1986
1 Replies
6. Shell Programming and Scripting
Hi frnds,
one my frnds has given resolution for my problem as below. it working great , but i couldnt understand somethings in the script.
Why ++ operator after the function calling. how these each block working. will each run for each input line sequencially or one block for all the lines... (9 Replies)
Discussion started by: Gopal_Engg
9 Replies
7. UNIX for Advanced & Expert Users
hi all
i was going through some perl code i came across this line and i am not getting what is exactly going on ..
$$this{localtion} = GetName->GetVarName("EXE_DIR") ;
what is the red part doing in above code (2 Replies)
Discussion started by: zedex
2 Replies
8. Shell Programming and Scripting
can u explain this step by step........plz...will it do the same
for I in *.tar.gz; do
A=`basename $I .tar.gz`
mkdir $A
cp marking-guide ${A}/$A
cd $A
gunzip -c ../$I | tar xf -
cd..
done
thnx
__________________ (2 Replies)
Discussion started by: avikal
2 Replies
9. UNIX for Dummies Questions & Answers
echo -n "1. Updating Password Policy in OID..." | tee -a $logfile
set ldap_v1 = `ldapsearch -b "" -h $oid_host -p $oid_port -D "cn=orcladmin" -w $admin_pwd -s sub "cn=PwdPolicyEntry" dn | head -1`
echo "dn:$ldap_v1" > ldap1.out
echo "changetype:modify" >> ldap1.out
echo... (2 Replies)
Discussion started by: maoro
2 Replies
10. UNIX for Advanced & Expert Users
HI,
Can anyone explain to me how does the following command work - >
current_dir=`cd \`/usr/bin/dirname $0\` && pwd`
Regards,
Ranga (3 Replies)
Discussion started by: r_W213
3 Replies