10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have no idea how to write ksh script, but i'm really in need of help with this. I using fedora 30 and in attempt of runnig attached script i getting those errors, i solved first error by removing excess bracket, but i do not know what should i do with other. Pls sorry for trash post. (8 Replies)
Discussion started by: NullPtr
8 Replies
2. Shell Programming and Scripting
hello Friend,
In hostgroup file, i have define lots of hostgroups. I need to remove few of them without manually editing file. Need script or syntax.
I want to search particular on hostgroup_members and delete hostgoup defination of it.
for example.
define hostgroup{
hostgroup_name... (8 Replies)
Discussion started by: ghpradeep
8 Replies
3. Shell Programming and Scripting
Hello !
I'm using a lot the command zf% with the cursor on the first bracket of a function for example, to fold it.
Ex : I put my cursor on the first bracket
myfunction(){
# body
}
I type zf%
It become :
+-- 9 lines : myfunction()... (2 Replies)
Discussion started by: Purgator
2 Replies
4. Shell Programming and Scripting
Is this possible? The below code not working for me.
dir=mydir
if ; then
echo "found /home/$mydir "
else
echo "Not found /home/$mydir"
fi
---------- Post updated at 05:28 AM ---------- Previous update was at 05:25 AM ----------
Its working for me now (1 Reply)
Discussion started by: anil510
1 Replies
5. Shell Programming and Scripting
Hi
I have to remove in a file in first column whatever is written in brackets with brackets
so one file
hgfd 123
gfhdj 483
jdgfdg 34738
the output shuld be
hgfd 123
gfhdj 483
jdgfdg 34738 (9 Replies)
Discussion started by: manigrover
9 Replies
6. Shell Programming and Scripting
here is a small script I wrote:
#! /bin/bash
if ]
then
echo "argument is null"
fi
It is giving error:
test.sh:
any idea, why is it so? (2 Replies)
Discussion started by: vina201unx2011
2 Replies
7. Shell Programming and Scripting
Related to :
thread : 34769-removing-duplicate-lines-file.html
i want to extract the words in ()
eg: string1="bla bla (aaa) aha hai (aa)"
after processing output i need is : aaa aa (2 Replies)
Discussion started by: linuxadmin
2 Replies
8. Shell Programming and Scripting
Hi,
Am trying to split a string with bracket in ksh but it is not splitting it correctly.
split("Hello, Name(1), Name(2)", main,",");
How do i split correctly? (3 Replies)
Discussion started by: nightrider
3 Replies
9. Shell Programming and Scripting
So, I have no formal higher education in programming at all and am self taught. I am now wondering what would be considered best practices? Like should I hard code a variable, then compare it to what I want to know or achieve, or should I just put the commands with in the brackets?
Example, a... (5 Replies)
Discussion started by: tlarkin
5 Replies
10. Shell Programming and Scripting
Hi
Input text is
some message some message some message
Expected output is
main value1 value2 value3
Any idea how to above values in square brackets using shell scripting?
many thanks. (3 Replies)
Discussion started by: hnh
3 Replies