10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi All,
I did a review of some threads to see if someone had come across this problem.
My system is an oracle virtual box solaris 10 installed on a windows 10 system.
Right now I am learning scripting and am just playing with the env variables.
I am trying to update the PATH to... (9 Replies)
Discussion started by: bdby
9 Replies
2. UNIX for Advanced & Expert Users
I created a awk state to calculate the number of success however when the query runs it has a leading zero. Any ideas on how to remove the leading zero from the calculation?
Here is my query:
cat myfile.log | grep | awk '{print $2,$3,$7,$11,$15,$19,$23,$27,$31,$35($19/$15*100)}'
02:00:00... (1 Reply)
Discussion started by: bizomb
1 Replies
3. Shell Programming and Scripting
Hi,
Consider the data (FS = |):
1| England |end
2| New Zealand |end
3|Australia|end
4| Some Made Up Country |end
5| West Indies|end
I want the output to be (i.e. without the leading and trailing white space from $2)
England
New Zealand
Australia
Some Made Up Country
West... (4 Replies)
Discussion started by: Storms
4 Replies
4. Shell Programming and Scripting
Hi all,
Hope someone can help me out here.
I have this BASH script (see below)
My problem lies with the variable path.
The output of the command find will give me several fields. The 9th field is the path. I want to captured that and the I want to filter this to a specific level.
The... (6 Replies)
Discussion started by: Cowardly
6 Replies
5. Shell Programming and Scripting
This seems to be a stupid basic question, but I cant get the space to stick in the awk variable.
I do use this command to grep a time range of the log file.
cat /var/log/daemon.log | awk '$0>=from&&$0<=to' from="$(date +%b" "%e" "%H:%M:%S -d -24hour)" to="$(date +%b" "%e" "%H:%M:%S)"
I now... (9 Replies)
Discussion started by: Jotne
9 Replies
6. Shell Programming and Scripting
Hi,
I have a large flat file from host without delimiter. I'm transforming this file to a csv file using statements like
# Row 03: Customer / field position 3059 +20
WOFABNAM=substr( $0, 3059, 20 );
and deleting the trailing whitespaces before and after with that
sub( /^ +/, "",... (4 Replies)
Discussion started by: Celald
4 Replies
7. Shell Programming and Scripting
Hey , I'm new to Bash and am having trouble with writing a script.
I have a variable and want to use it to create a tar file, but, I am having problems. Can anyone tell me what I'm doing wrong?
filestr=`date "+%y-%m-%d %H.%M.%S"`.tar
tar -cvf $filestr test.txt
So, basically,... (3 Replies)
Discussion started by: beefeater267
3 Replies
8. Shell Programming and Scripting
Hi
I need to write a script where there the user enters 3 input parameter
variable
number
the program should ask the user left or right
if it is left , the number specified that many spaces should be added to the value in front of the value and saved in the samee variable itself and if it is... (5 Replies)
Discussion started by: viv1
5 Replies
9. Shell Programming and Scripting
Dear all
I had two separate variable. Now i want to make them merge into one new variable with space between them. Kindly suggest me.
var1=dec 15
var2=10
i want var3=dec 15 10
My main aim is as below:
op of date command:
>date
>Sat Dec 15 10:17:35 IST 2007
i want only Dec... (2 Replies)
Discussion started by: jaydeep_sadaria
2 Replies
10. Shell Programming and Scripting
Hi,
How to check if a variable is having spaces or empty in shell scripts.
Please help
esham (4 Replies)
Discussion started by: esham
4 Replies