10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
The below awk improved bu @MadeInGermany, works great as long as the input file has data in it in the below format:
input
chrX 25031028 25031925 chrX:25031028-25031925 ARX 631 18
chrX 25031028 25031925 chrX:25031028-25031925 ARX 632 14... (3 Replies)
Discussion started by: cmccabe
3 Replies
2. Shell Programming and Scripting
Hello Team,
I need bash script to check if my output is non numerical or empty. if its then my output should display default value as 0
basically, I am reading value from txt file. most of numerical value, in case there is no numerical value or its empty, then my output should be 0.
... (5 Replies)
Discussion started by: ghpradeep
5 Replies
3. Shell Programming and Scripting
Hello,
I'm trying to figure out how best to approach this script, and I have very little experience, so I could use all the help I can get. :wall:
I regularly need to delete files from many directories.
A file with the same name may exist any number of times in different subdirectories.... (3 Replies)
Discussion started by: *ShadowCat*
3 Replies
4. Shell Programming and Scripting
Hi,
Below shell script executes based on liasted data files parameters.But small problem need to avoid ,If any empty line occures in dat files it's throwing oracle error .Need to ignore empty lines (means does not ready by script).Please advice.
#/bin/sh
adsts=`cat... (2 Replies)
Discussion started by: krajasekhar.v
2 Replies
5. Shell Programming and Scripting
I have a local linux machine in which the files are dumped by a remote ubuntu server. If the process in remote server has any problem then empty files are created in local machine. Is there any way using perl script to check if the empty files are being created and delete them and then run a shell... (2 Replies)
Discussion started by: hussa1n
2 Replies
6. Shell Programming and Scripting
I need to create a script that has a user enter a value. I want to verify that the value is either 1,2, or 3. If it is not then I want them to try entering it again. I am using a while loop to force them to retry.
I am able to test the input against 1,2, and 3, but when I test agains an... (4 Replies)
Discussion started by: spartiati
4 Replies
7. Shell Programming and Scripting
I have a script (multirun.sh) which launches the program bsim_em.x or bsim_es.x depending on the value entered from the screen:
> multirun.sh 1 (executes bsim_em.x)
> multirun.sh 2 (executes bsim_es.x)
which, simplifying, I do with the following lines in the multirun.sh script:
if ... (3 Replies)
Discussion started by: josegr
3 Replies
8. UNIX for Dummies Questions & Answers
I want to count the number of lines in a file and store it in a variable if this count is zero i hv to throw an error ...is this syntax correct , but i am not getting the desired result
I am not using -s option here as i am concerned about record count not the size
#!/bin/ksh
set $count1... (4 Replies)
Discussion started by: mavesum
4 Replies
9. UNIX for Dummies Questions & Answers
Hi All,
I am checking for a empty input file to do some further action , but I am getting exit status 0 in both the cases , for empty and non empty file both.
The value of $? is coming 0 in if part also and else part too.
#!/bin/ksh
if ]; then
echo "data"
# exit 0
echo "$?"
else... (4 Replies)
Discussion started by: mavesum
4 Replies
10. Shell Programming and Scripting
Hello, All.
please help me with this problem.
i need to use variable as regular expression.
some thing like this:
BEGIN {
RS="\n";
ORS="\n";
reg_exp = ".+Dec.+";
# i mean that regular expression is any symbol before "Dec" and any symbol after it. For example <Worksheet... (6 Replies)
Discussion started by: Rjkz
6 Replies