Hello, I am getting Expression syntax message and I cannot figure out what's wrong. This program will print all the odd numbers between 0 and the one the user enters, in cshell. I think my logic is either good or almost there, but i dont see the errors. I think it could be the spaces between... (1 Reply)
Hi
what's the correct way of writing if
1)if "$time_diff" -gt 5
then
echo "killing hung process \n"
fi
2)if test $time_diff -gt 5
then
echo "killing hung process \n"
fi
where -time_diff=$(($Sam - $current_min))
and current_min=`date +%M`
infact both are giving Syntax... (1 Reply)
Hello,
This is my first post so, Hello World! Anyways, I'm learning how to use unix and its quickly become apparent that a strong foundation in regular expressions will make things easier. I'm not sure if my syntax is messing things up or my logic is messing things up.
ps -e | grep... (4 Replies)
#! /bin/csh
set umr=UMR
foreach i ( `ls`)
set file_nm=$i
set bh_nm=`echo $file_nm | cut -d"_" -f2`
if($bh_nm !=$umr) then
{
set bh_ext=`echo $file_nm | cut -d"_" -f4`
set bh_num_nm="$bh_nm $bh_ext a .txt"
mv $file_nm $bh_num_nm
}
... (1 Reply)
Hello,
I am relatively new to UNIX scripting and am learning a lot. I have already tried several searches on this website and have tried various syntax options suggested to no avail. I am obviously not writing the script correctly. I really do appreciate any and all the help.
Below is an... (8 Replies)
I'm pretty new to shell scripting, but I am catching on quick. I did see one of the stickied threads about the csh, and I think this is relevant, but I don't understand enough to make a decision based on it. So as you'll see below, I use the |csh pipe, and if that is not correct, I'm certainly... (2 Replies)
Hello there!
I am having some difficulties in the syntax of a script.
I am a newbie :)
What i want is a script that copies 1 or more files to a destination folder with
a question if file allready exists
if ($#argv > 2) then
if (-d $argv($#argv)) then
foreach x ($*)
cp -i $x to... (4 Replies)
I've found this script which seems very promising to solve my issue:
To search and replace many different database passwords in many different (.php, .pl, .cgi, etc.) files across my filesystem.
The passwords may or may not be contained within quotes, single quotes, etc.
#!/bin/bash... (4 Replies)
I'm using tcl scripts in ns2 ( network simulator) through cygwin. It works fine , however, I downloaded an example when i run it , I got the following syntax error:
syntax error in expression with " *2" : unexpected operator *
while executing :
"expr $bw *2"
invoked from within:
"$ns... (1 Reply)
#!/bin/bash
a1="04:29:39 - System health check failed"
i=$1
echo "a $((a$i))"
The script above gives the following error
$113> sh tryt.sh 1
tryt.sh: line 6: 04:29:39 - System health check failed: syntax error in expression (error token is ":29:39 - System health check failed")
It... (1 Reply)
Discussion started by: ashima jain
1 Replies
LEARN ABOUT DEBIAN
gfs_chmod
GFS_CHMOD(3)GFS_CHMOD(3)NAME
gfs_chmod - change permissions of a file
SYNOPSIS
#include <gfarm/gfarm.h>
char *gfs_chmod (char * gfarm_url, mode_t mode);
DESCRIPTION
gfs_chmod() changes the mode of the file given by gfarm_url. Permission bit masks of mode are similar to ones of mode parameter to
chmod(2), though only the least 9 bit are effective.
An executable file cannot be changed to a non-executable file and vice versa, unless the number of fragment of the file is only one. In
detail, a file has multiple fragments with any execution bit should not be changed to that with no execution bit. It is necessary to have
at least one execution bit. Similarly, a file has multiple fragments with no execution bit should not be changed to that with any execu-
tion bit.
RETURN VALUES
NULL The function terminated successfully.
GFARM_ERR_NO_MEMORY
Insufficient memory was available.
GFARM_ERR_AUTHENTICATION
User authentication failed when connecting to gfmd(8) or gfsd(8).
GFARM_ERR_PERMISSION_DENIED
The parent directory of gfarm_url did not allow write permission.
GFARM_ERR_OPERATION_NOT_PERMITTED
The effective UID does not match the owner of the file, and is not zero. Or an attempt was made to change an executable file with
more than one fragment to a non-executable file, or vice versa.
GFARM_ERR_NO_SUCH_OBJECT
The file does not exist.
GFARM_ERR_NOT_A_DIRECTORY
A component of the path prefix is not a directory.
Others An error except the above occurred. The reason is shown by its pointed strings.
Gfarm 13 November 2006 GFS_CHMOD(3)