Hi, i have the below code that will compare the value from 2 variables:
The variables are $1 and $w where $1 is the input string e.g. JMS.sh VAR1, so basically, if $1 is equal to $w then i dont have problem but if its not equal then ill have an output as below:
"JMS.sh[4]: test: 0403-004 Specify a parameter with this command.
-1"
i expected to have an output of "-1" only.
I suspect that its due to the command line:
where $1 cannot find a match from out.dat then it threw some error.
Please advice how to go with this. I only want to have an output "-1" if $1 is NOT equal to $w.
Hi
I am running a script (which compares two directory contents) for which I am getting an output of 70 pages in which few pages are blank so I was able to delete those blank lines.
But I also want to delete the headers present for each page. can any one help me by providing the code... (1 Reply)
Hi , I have written a csh script which is as follows but it keeps outputing a unneccesary output as show below. How can i remove that output and prevent it from displaying it when the script runs?
set USER = "aaa"
set PASSWORD = "bbb"
ftp -n 10.80.12.18<<XX
user $USER $PASSWORD... (2 Replies)
Hello Friends,
In a script i m using different temporary file and i remove them in the end.
During script execution i have some garbage output which is not required.
For example: Garbage Output
++ rm temp_out temp_a temp_b temp_c
++ rm Filter1 Filter2
Script : Even i am redirecting rm... (7 Replies)
Hi
I have a new hdd installed ,and sometimes if i start a session or ftp download while downloading sometimes it creates a ./filename.type Input/output errorso in that case i can-not overwrite ,rename ,remove ,or place a file with the same name on that dir.
How to prevent this and is there... (3 Replies)
I am back again with one more question,
so I have a phonebook file with names, phone#s
for example: smith, joe 123-456-7890
using awk I want to display all entries with a specific area code. here 's what i have tried so far:
awk '$2~/^123/ {print}' phonebook
I can't figure... (1 Reply)
Hi,
I'm on AIX 5.2. I wrote a script that makes a traceroute to a host. The script works fine but each time it using the traceroute command its generate the 2 output lines.
this is the command in my script
traceroute -n -m 5 -w 2 $Host | grep 172 | awk '{print $2}' | tail -1
traceroute... (2 Replies)
Hi All
I am trying to perform the below operation -count=`cat abc.txt | wc -l`
echo$count
5
Head=Start"$DATE"00000"$count"File
echo $HEAD
START15020300000 5File
There is a space coming before 5 which is not needed . How to ignore that . (4 Replies)
If run the below code today its creating all directory and getting output files,I f run same code tomorrow I am getting error.
can any one give suggestion to sortout this error.
OSError: no such file or directory : '062518'My code looks like this
import paramiko
import sys
import os ... (8 Replies)
Hello,
I am trying to print searched multiple keywords in multiple files.
It is almost okay with the code but the code puts filename in front of each line.
How may I get rid of it?
-grep -A1 'word1' *.txt | grep -A1 'word2' | grep -A1 'word3'
I expect:
Real outcome:
How may I... (3 Replies)