10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Our application fails to run successfully on Solaris 11. The same works fine in Solaris 10.
Due to which we are unable to migrate to Solaris 11. The app basically involves forking a child process, which finally connects with parent process. But on Solaris 11, it is unable to connect with parent... (0 Replies)
Discussion started by: wini008
0 Replies
2. Shell Programming and Scripting
Hi, awk seem to be acting differently in Unix and Linux when it comes to formatting. This is making it difficult to migrate scripts.
for example:
UNIX:
echo "123" |awk '{printf ("%05s\n" ,$1)}'
00123
echo "123" |awk '{printf ("%05d\n" ,$1)}'
00123
echo "S12" |awk '{printf ("%05s\n"... (9 Replies)
Discussion started by: wanderingmind16
9 Replies
3. Shell Programming and Scripting
Hi Gurus,
I hit a hard block in my script.
when using awk command with variable, I got different result.
Please see below:
my test file as below:
$ cat demofile.txt
filename-yyyy-abcd
filename-xxx-week-pass
filename-xxx-week-run
for testing purpose, I put 3 awk command in one script.... (7 Replies)
Discussion started by: ken6503
7 Replies
4. Shell Programming and Scripting
awk 'BEGIN{OFS=","} FNR == 1
{if (NR > 1) {print fn,fnr,nl}
fn=FILENAME; fnr = 1; nl = 0}
{fnr = FNR}
/UNUSUAL/ && /\.gz/ ~ /FILENAME/ {nl++}
<'{system ("gunzip -cd FILENAME")}'
END ... (2 Replies)
Discussion started by: SkySmart
2 Replies
5. Shell Programming and Scripting
I notice that su - user (note with dash) brings in more of the user's environment than does su - user -c 'command'. For example, if root does an su - user, and types "umask" to the prompt, one umask is displayed; yet, if instead the command is su - user -c 'umask', the value is different. I thought... (2 Replies)
Discussion started by: drokerm
2 Replies
6. Shell Programming and Scripting
Hi have a script which transferers from Microsoft server to Linux box.
The scripts(ksh) is on Linux box.
If I run script from terminal, it transfers files to directory. Where as If
I run script from CRON. It does not.
Here is the log of both:
Terminal execution log:... (2 Replies)
Discussion started by: dipeshvshah
2 Replies
7. AIX
$cat /tmp/tuxob.lst
udi *****
jim 10
ant 19
ibm *****
$ input=`head -1 /tmp/tuxob.lst | awk '{print $NF}'`
$ echo $input
The output I am expecting is '*****'. But It is showing me the available files of current directory. When I run the command
head -1 /tmp/tuxob.lst | awk '{print $NF} ... (3 Replies)
Discussion started by: panchpan
3 Replies
8. Shell Programming and Scripting
Greetings,
I would be very grateful to anyone who is willing to help and knows there scripting and how to convert a DOS CMD script. :)
In this posting I am also hoping to pass on information to anyone wanting to see a bit of VMware command line stuff.
I have made a script (batch file) that runs... (11 Replies)
Discussion started by: dp123
11 Replies
9. Shell Programming and Scripting
I have a simple csh-script on a Solaris Workstaion which invokes the bc calculator:
#!/bin/csh
set shz=2
set zshift=5
set shzp=`bc -l <<END \
scale = 3 \
-1. * $shz + $zshift \
END`
echo $shzp
The result ($shzp) in this case is 3 (-1*2+5). It works fine on Solaris 8.
... (2 Replies)
Discussion started by: two reelers
2 Replies
10. Shell Programming and Scripting
Hey all,
Just wanted to get some input on a script I am using to import files into a MySQL database.
The process is pretty simple: my main server exports these files and FTPs them. I have a script that FTPs them to the machine running that runs this script. The FTP script runs without issue... (2 Replies)
Discussion started by: billtwild
2 Replies