convert script linux to solaris???


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting convert script linux to solaris???
# 1  
Old 12-30-2011
convert script linux to solaris???

dear all

how to convert my script like this

Code:
Code:
awk -F "," '{close(f);f=$1}{print > f".txt"}' sample.txt

for using in solaris iam first in solaris so all my script in linux not alot of working in solaris

thx for advice
# 2  
Old 12-30-2011
Just use, nawk instead of awk!

--ahamed
# 3  
Old 12-30-2011
oww in solaris must be using like this:

Code:
/usr/xpg4/bin/awk -F "," '{close(f);f=$1}{print > f".txt"}' sample.txt

thx for adviceSmilie
case solve
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Script to convert dos to UNIX in Solaris

Hi Team, I am trying to implement a script in Solaris, that required to find the list of files inside directories and convert those to dos2unix conversion, Can someone please help here.. Below is the example of scenario.... (1 Reply)
Discussion started by: Logics123
1 Replies

2. Shell Programming and Scripting

Want to convert an expect script to binary in Linux

Does anyone know how to convert an expect script to binary in linux?. (3 Replies)
Discussion started by: John Wilson
3 Replies

3. Shell Programming and Scripting

Porting script from Solaris to Linux

I have a script which has commands that are located in different paths on my Linux o/s than on Solaris. For example, to make uname work, I need to do it this way in Solaris: my $host= `/usr/bin/uname -n` But in Linux it is: my $host = `/bin/uname -n`I have this issue with at least 5... (8 Replies)
Discussion started by: newbie2010
8 Replies

4. Shell Programming and Scripting

Write Linux script to convert timestamps older than 1.1.1970 to 1.1.1980

I am having problems because some of my files have timestamps that are earlier that 1.1.1970, the Unix start of time convention. So I would like to write a script that finds all files in home folder and subfolders with timestamps earlier than 1.1.1970 and converts them to 1.1.1980. I... (3 Replies)
Discussion started by: francus
3 Replies

5. Shell Programming and Scripting

Same script for Solaris,Linux,AX

Hi , I have a script which is running in Solaris. But my requirement got changed...this script has to run in all OS like Linux,AIX. I tried it but most of the command is not found in all these OS. Is there any way so that i can just modify some part and run it in all OS. (3 Replies)
Discussion started by: millan
3 Replies

6. Shell Programming and Scripting

Solaris Script Going To Linux

I am having an issue with the following command in Linux... penguinshrimp:/lcl/apps/Tivoli/omnibus_procedure_scripts>df -bhk /lcl/apps/Tivoli/omnibus_procedure_scripts | cut -d "y" -f1 | awk '{print$5}' df: invalid option -- b Try `df --help' for more information.... (1 Reply)
Discussion started by: LRoberts
1 Replies

7. Shell Programming and Scripting

Solaris / Linux Issues with script

Hello, I run this command from a solaris box and it works just fine. It gives me the kind of output in my file I am looking for which would be for example... sb1p rdop ot2p ot3p eimp However when I do the same thing from a Linux box... ps -ef | grep nco_p_syslog | grep -v grep |... (19 Replies)
Discussion started by: LRoberts
19 Replies

8. Shell Programming and Scripting

Want To convert script in Linux format

I have scripts which I want to convert in Linux format. Note these scripts are in txt format.But I want to convert them in Linux, as DBA's will be using this script. Any command or utility which converts tht files in proper Linux format. Thanks in Adavce. Kunal (1 Reply)
Discussion started by: niceboykunal123
1 Replies

9. Shell Programming and Scripting

Script works on Solaris, not on Linux

I'm in the same boat as Barbus - same exercis (https://www.unix.com/shell-programming-scripting/43609-processes-users.html) The following script works on a solaris server I have access to. It doesn't however, work on the companies Linux machine. Any idea what's up? I have very little shell... (0 Replies)
Discussion started by: Silverhood
0 Replies

10. Shell Programming and Scripting

here-doc convert 2 script convert to single script?

I have my main script calling another script to retrive a "ls -alt" of a directory that's located in a remote location I'm sftping into. main.sh #!/bin/ksh getLS.sh > output.txt getLS.sh #!/bin/sh /home<..>/sftp <host@ip> <<! cd /some/dir/Log ls -alt quit ! Basically I'd like to be... (2 Replies)
Discussion started by: yongho
2 Replies
Login or Register to Ask a Question