12-21-2005
RE: pulling scripts from unix to linux
Quote:
Originally Posted by pjconfig
I am working on transferring "good" running code scripts from unix to linux (suse). Some errors show in linux that are not present in unix. Specifically, the error code is: codename [2886]: no closing quote This is referring to the last line of the code + one line. I have used temporary exit to locate the place where the error begins. It seems to be in the code below, but I am crossed eyed trying to find the error. Can anyone help?
for fields in 16 17 18 19 20
do
info[${x}]=`print "${line}" | awk -v fld=${fields} 'BEGIN {FS="
"} {print $fld}' | sed 's/^ *//' | sed 's/ *$//'`
if [[ ${#info[${x}]} -eq 0 ]] then
break
fi
x=`expr ${x} + 1`
done
slash_tst=`print "${info[2]}" | awk '{print substr($0,length($0))}'`
if [[ "${slash_tst}" = "/" ]] then
Do you have any idea what I am talking about?
Some may errors show in linux that are not present in unix, but not all.
Who told you that? Cool.
I have
a birthday on 2001.
I agree. Are you in the code below but he or she am crossed eyed trying to find the error ?Suppose they do.Your purpose is fields in 16 17 18 19 20 do infoprint $beginscriptlineendscript | awk -v fld$beginscriptfieldsendscript 'BEGIN beginscriptFSendscript beginscriptprint $fldendscript' | sed 's^ *' | sed 's *$' if endscript -eq 0 ]] then break fi xexpr $beginscriptxendscript + 1 done slash_tstprint $beginscriptinfoendscript | awk 'beginscriptprint substr$0length$0endscript' if ].
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Can anybody help me in finding out a solution for the problem below?
When we write .unix or .sh files in windows OS and port them to Unix platforms there is a character ^M inserted at the end of each line of the script file.
During ftp porting I set the transfer mode as ASCII for the script... (7 Replies)
Discussion started by: tamilselvi
7 Replies
2. Shell Programming and Scripting
I want to write a script which connects to another linux via ssh.
now i need to execute the rest of my script in that linux..
the echo is coming only when i exited from 10.1.1.252..
pls help (4 Replies)
Discussion started by: esham
4 Replies
3. UNIX for Dummies Questions & Answers
I'm pretty new to the world of linux, so no flames please.
I know there is a plethora of info out on the internet about writing scripts for linux, but few give actual examples.
I need some help with learning the basics of writing some simple scripts to learn the difference between windows and... (1 Reply)
Discussion started by: Strm2k
1 Replies
4. UNIX for Dummies Questions & Answers
Hi All,
You have a very large file, named 'ColCheckMe', tab-delimited, that you are asked to process. You are told that each line in 'ColCheckMe' has 7 columns, and that the values in the 5th column are integers. Using shell functions (and standard LINUX/UNIX filters), indicate how you would... (7 Replies)
Discussion started by: am2007
7 Replies
5. UNIX for Dummies Questions & Answers
Hi
I have a file called as MSD.DAT. This file is present at a directory on a server.
www.ta.ibhsv.somewhere.com/rahdf/MSD.DAT
Now, I want to get this file from this server to my Linux box. I need to write a script that uses https to get the file.
Please help how to achieve this.
... (3 Replies)
Discussion started by: infyanurag
3 Replies
6. Shell Programming and Scripting
Hi,
could someone help me to create the following scripts
Need to create couple of shell scripts on LINUX SLES 10
Using my id
---------------
First script – this script should contain su and should take input <process name>
1 -login using my id and then sudo to... (1 Reply)
Discussion started by: lookinginfo
1 Replies
7. Shell Programming and Scripting
We are changing our OS from HP-Unix 11 to Linux Red Hat. We have few k- shell, c - shell and sql scripts which are currently running under HP-Unix 11. Will these scripts work on LINUX as it is? or we need to do any code changes?IS there anyone who have done this kind of migration before?Thanks for... (2 Replies)
Discussion started by: Phoenix2
2 Replies
8. Shell Programming and Scripting
Hi,
I have a script which invokes another script inside. Is there any way I can validate the script for syntax errors as well as checking if the files mentioned in the commands exist without executing it? Below is an example
Example.
=======================
Script1
#ksh
echo... (3 Replies)
Discussion started by: krish000
3 Replies
9. UNIX for Dummies Questions & Answers
Hai All,
Greetings....
I am doing a migration from Solaris to Linux .There are few scripts (logadm, nfsfind, gsscred_clean, kprop_script) for which I need a alternate in Linux.
If somebody can help.
Thanks in advance (1 Reply)
Discussion started by: Dilipkumarkm
1 Replies
10. Shell Programming and Scripting
Hi,
Recently we migrated our app from Unix to Linux platform. All our shell scripts which use to work in Unix platform are not working in Linux now.
below is such sample script. I tried removing trailing spaces, but no luck. dear experts kindly help..
#############BEGIN###############
split... (7 Replies)
Discussion started by: laxman_bly
7 Replies