10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I am facing a problem while checking for existence of file over ssh !
Basically, i want to ssh and check if file exists.. If file exists return 1. If file does not exits return 0 (or any value)
I am using the below code
file_avail=`ssh username@host "if ]; then exit 1;... (10 Replies)
Discussion started by: galaxy_rocky
10 Replies
2. Shell Programming and Scripting
Hi,
In my shell script I use the following code to copy files from one directory to other.
for file in `ls`; do
#----------------- Copy Files From INDIR to OUTDIR -------------#
echoen "Copying File ${INDIR}/$file to ${OUTDIR}/${file}"
cp ${INDIR}/$file ... (4 Replies)
Discussion started by: pinnacle
4 Replies
3. Solaris
I want to copy tar file to another machine. tar size is 4gb.
Firstly I tried copy to windows machine with ftp client but copy operation didn't start.
Now I have tryied to copy to solaris machine command with scp but copy was freezed. Picture is attached.... (1 Reply)
Discussion started by: getrue
1 Replies
4. UNIX for Advanced & Expert Users
Hi ,
while doing FTP from mainframe to unix if the file we are sending is already existing in the server ,it is getting replaced.when i used sunique command,its not replacing but stil creates a copy of the file with .1 to .99 extension.is there any way to abort the file transfer if the file is... (3 Replies)
Discussion started by: amodmenon
3 Replies
5. Programming
This is the source code:
#include <pwd.h>
#include <iostream>
#include <string.h>
using namespace std;
int main()
{
struct passwd *user;
char login="alex", password="qwertyuiop";
if ((user= getpwnam(login)) == NULL)
cout << "No such user\n";
else if... (24 Replies)
Discussion started by: hakermania
24 Replies
6. UNIX for Dummies Questions & Answers
Hello all
I am having problems using a bash script to read the input from the user and checking that its a valid number. I only want the user to input a maximum of a 3 number string (321 , 521 , 871 etc.). Anything longer or that includes a chararcter or symbol will display an error message.
... (8 Replies)
Discussion started by: ChrisHoogie
8 Replies
7. Shell Programming and Scripting
Hi All,
I have a written a scell script which checks the existence of a directory. The dierctory name is read from property file. Though the dierctory exists but it says - it does not exist--
Find my code below --
#! /bin/ksh
#Tibco Properties file is inclusion
.... (5 Replies)
Discussion started by: supriyabv
5 Replies
8. UNIX for Dummies Questions & Answers
Hi everyone,
I am writing a script. As a part of this script, I wanted to check the space of few mounts, If the space usage percentage of the mount crosses over a certain limit then i wanted to display a warning message. The following is the command
df -k | awk ' { if (($6 == "/export/temp")... (4 Replies)
Discussion started by: Sheethal
4 Replies
9. UNIX for Advanced & Expert Users
I'm running Red Hat Linux 2.6.7 on a x86_64 box.
I have a core file from a program that called abort(). Does anyone here know how can I get a backtrace? (Re-creating the error with svd running inside gdb has proved impossible).
% gdb svd core.25223
GNU gdb Red Hat Linux... (2 Replies)
Discussion started by: svact
2 Replies
10. Shell Programming and Scripting
Here is my problem
I'm designing a script that will have to accept user input from the command line using the read command.
The problem is that I have to check the input which should be in the format of
<first name> <last name> <phone number (8 digits long)>
The input can also be
... (4 Replies)
Discussion started by: pokeycam
4 Replies