9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I have compiled a script but I have stucked at one point.
Each line contains two pcs of % value and what I want to do is to delete any line if both % values are zero.
data:
expected output:
ow3 should be deleted as both percentage value in related line are equal to zero.
... (2 Replies)
Discussion started by: baris35
2 Replies
2. Shell Programming and Scripting
Hello everyone,
I have a requirement as shown below. I need to delete consecutive same values from the source file and give it as output file.
Source:
a,b,c,d,e,e,f,g
Target:
a,b,c,d,f,g
The repeating value "e" should be deleted from the file completely. How can I achieve this... (14 Replies)
Discussion started by: vamsikrishna928
14 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I have a tab delimited text file where some lines have the string "NA" in the second column. For these lines, I want to replace NA with the value in the first column, the symbol underscore followed by the value in the fourth column. How do I go about doing that? Thanks!
Input:
1 ... (3 Replies)
Discussion started by: evelibertine
3 Replies
4. UNIX for Dummies Questions & Answers
Hi there can anyone help me please. I want to make a program to check if the executable file specified by the user exists in the directory.
When I run this program particulary these lines of code does not work:
if ("$fi" == "$name") then where It checks whether the specified file is equal to the... (1 Reply)
Discussion started by: FUTURE_EINSTEIN
1 Replies
5. Shell Programming and Scripting
How do I go about amending this simple script that prompts for a yes/no response so that if neither Y or N are entered it will loop back back to the original prompt
#!/bin/ksh
echo "Enter yes of no"
read answer
if
then
echo "You selected yes"
elif
then
echo "You selected no"
elif... (5 Replies)
Discussion started by: gmears
5 Replies
6. Shell Programming and Scripting
Hi all
I have this script that i have written in some logging for but i do not want it to log for all option, i have used Getopt::Long 2.11 to allow differnt switches but i only want logging on one type of switch
this is my code but it does not like the ne (not equals)
i do not wnat the... (7 Replies)
Discussion started by: ab52
7 Replies
7. Shell Programming and Scripting
Hi all
I am trying to scan a file that has 3 columns:
red blue 123351
red blue 848655
red blue 126354
red blue 023158
black white 654896
red blue 650884
I want an output that sums the rows that have matching columns 1 and 2 :wall:
red blue has 5 entries
black white has 1 entry
... (4 Replies)
Discussion started by: reno
4 Replies
8. Shell Programming and Scripting
while + and equal to zero ; then
what to punt instead of phrase and equal to zero.
it's bash
thank you in advance (1 Reply)
Discussion started by: losh
1 Replies
9. Shell Programming and Scripting
Hi,
I have the below script executed
arg="dir"
if "$arg" = "dir"
then
echo "true"
else
echo "false"
fi
Please let me know what happens in the if command.
My output is:
dir: dir: No such file or directory
false
which is not the desired output.
When i used test command... (1 Reply)
Discussion started by: anijan
1 Replies