What should it do if its a number or word? That affects how one might check and where.
Also, why do you do this:
That tries to read into two variables, 'Something' and 'in', but 'in' never gets used. You can leave it off, the statement will work without it.
Also, please use code tags for code. Quote my post to see how.
Sorry, I'm new to this forum. Will use the code tag in future.
The input should be a word, not a number. If the input is a number, it will keep looping and echoing an invalid statement until the input is a word.
The problem I am facing is, the first loop is working, I cannot input a blank, but I can still input numbers.
I am thinking of something like this
Yes, and I realised that the 'in' does not affect anything. Will remove it.
Hello Guys
I need some help with my script
I'm not very good at this, hope you can point me in the right direction.
My idea, to write a file with some router commands and use it on a script for me to run on a demand basis, ( or added to the cron, if I get it to work).
The below script works,... (5 Replies)
I am running on HPUX using ksh.
I have a script that uses a loop within a loop, for some reason the script seems to hang on a particuliar record. The record is fine and hits the condition in Blue. If I kill the 1st loop process the script continues on with no problem.
Begin code>
<Some... (8 Replies)
I'm trying to create a loop that will prompt the user for 15 values, not forcing them to enter all 15. If the user enters through one or more of the prompts the null value needs to be converted to 0, otherwise set the parameter = to the value entered:
ex.
Please enter file no #1: 17920
... (4 Replies)
Hi,
how can I use "for" to have two loops :
this is my script :
for i in (A B C)
do
for j in (a b c)
do
echo $i$j
done
done
#End
I want to print out
Aa
Ab
Ac ....
But I have error message :
syntax error at line 1 : `(' unexpected
Many thanks before.
How should I use "for" ?? (2 Replies)
I am traversing down a list, and I am not quite sure how to tell the loop to break when it's done going through the file.
#!/bin/sh
while :
do
read list <&3
echo $list
done
is the code. The file "list" is simply
5
4
3
2
1
any advice on how to break the loop after the file is... (1 Reply)
Hi All
I have some directories on our server which are containing .csv files. i need to print value of cell "B2" from those csv files. Please advise.
I have tried head command as example: head -2 */Book_Collection_Report_1_-_Collection_Requests_trials.csv | sed -n "3p" | awk -F","... (4 Replies)
Hi please help.
I have a file with two columns.
I want to insert the value of the first column and second column in different sections of a line.
code:
for line in `cat $1`;
for x in `cat $1 |awk '{print $2}'`;
do
do
echo "print $line and then print $x"
done
done
It works... (8 Replies)
My apologies for the long post....
I have a structure problem with my ksh script on linux.
right now it does what i want (which i know is the point) but its really really ugly and i know there must be a simpler way to achieve my task.
The data is a list of usernames. This list will help... (2 Replies)
I'm trying to understand better the while and until loops, can someone help me with this example?
#!/bin/bash
# Listing the planets.
for planet in Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune Pluto
do
echo $planet # Each planet on a separate line.
done
echo; echo
for... (3 Replies)
Discussion started by: jose2802
3 Replies
LEARN ABOUT MOJAVE
setcap
SETCAP(8) System Manager's Manual SETCAP(8)NAME
setcap - set file capabilities
SYNOPSIS
setcap [-q] [-v] (capabilities|-|-r) filename [ ... capabilitiesN fileN ]
DESCRIPTION
In the absence of the -v (verify) option setcap sets the capabilities of each specified filename to the capabilities specified. The -v
option is used to verify that the specified capabilities are currently associated with the file.
The capabilities are specified in the form described in cap_from_text(3).
The special capability string, '-', can be used to indicate that capabilities are read from the standard input. In such cases, the capabil-
ity set is terminated with a blank line.
The special capability string, '-r', is used to remove a capability set from a file.
The -q flag is used to make the program less verbose in its output.
EXIT CODE
The setcap program will exit with a 0 exit code if successful. On failure, the exit code is 1.
SEE ALSO cap_from_text(3), cap_set_file(3), getcap(8)
24th October 2008 SETCAP(8)