10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have googled this and found many solutions, but none of them are working for me. I am in a korn shell, most others reference bsh, maybe that is the issue? Anyway, all I am trying to do is use a variable I have declared in my main script in a remote shell I am running through ssh.
So I have a... (8 Replies)
Discussion started by: DJR
8 Replies
2. Shell Programming and Scripting
I have a test file with the following format, It contains the username_date when the user was locked from the database.
$ cat lockedusers.txt
TEST1_21062016
TEST2_02122015
TEST3_01032016
TEST4_01042016
I'm writing a ksh script and faced with this difficult scenario for my... (11 Replies)
Discussion started by: humble_learner
11 Replies
3. Shell Programming and Scripting
Good Afternoon,
I start with a file named biglist.txt.
I have another file smallerlist. txt
I want to remove the lines from smallerlist.txt from biglist.txt and leave those lines that do not reside in smallerlist.txt.
Thanks !! (2 Replies)
Discussion started by: popeye
2 Replies
4. Shell Programming and Scripting
Hi, i need to read a line from a file and count the number of times it appear in, then continuous to the second line with the same. So when i count a line i have to remove all duplicates in the file to not count it another time.
while read line
do
n=$(grep -c $line File)
print "$line... (5 Replies)
Discussion started by: ToniX
5 Replies
5. Shell Programming and Scripting
KSH
A simple remove command is not workin for me. The user has all the access and the return code after remove command is 0. But I am still able to find the file. I have the code as below.
tmplog=/tmp/$fl_nm.$$
main () {
--set of statments
rm -fr $tmplog
RC=$?
} (2 Replies)
Discussion started by: tostay2003
2 Replies
6. Shell Programming and Scripting
I have a korn shell code here on a while do statement which replace the string stored on an array removing double quotes characters on it but it doesn't work.
example record: appointmentDate = "tree" which value should result to tree
#!/bin/ksh
# Remove " on string records
let recordCount=3... (5 Replies)
Discussion started by: ryukishin_17
5 Replies
7. Shell Programming and Scripting
If we assume that each line between the {} container is an XML document then What I want to remove the newline character from all lines within each container to have one XMDL document per line I wrote a bit of sed after trawling the web:
e.g.
#!/bin/sed -nf
H
/}/ {
x
s/\n//g
p... (3 Replies)
Discussion started by: JamesJSC
3 Replies
8. UNIX for Dummies Questions & Answers
Hi everybody. Firstly, sorry for doing such a basic questions, but i have never worked with linux shells and at this moment i am trully desperated :d.
I have been checkin' another posts of this forum looking for different things for mixing them and get the solution to my problem, but i have not ... (2 Replies)
Discussion started by: bringer
2 Replies
9. Shell Programming and Scripting
dear pro-coders,
is there any command out there that takes out the front spaces from a string?
sample strings:
4 members
5 members
3 members
but it has to be like so:
4 members
5 members
3 members (3 Replies)
Discussion started by: pseudocoder
3 Replies
10. Shell Programming and Scripting
Hello,
I am writing this script in ksh (consisting of various functions such as -> read_file, write_file, pront_output and initialise) which basically process input files based on the parameters it contains.
My task now is to write any error conditions trapped by any of the function above to... (2 Replies)
Discussion started by: sidamin810
2 Replies