10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I am new new to unix.com, I have a question related to shell scripting.
We have a Oracle database backup shell script, which can be used for taking full, incremental & archive log backup based on the parameters passed.
Within the script we export a variable as
export... (5 Replies)
Discussion started by: veeresh_15
5 Replies
2. Shell Programming and Scripting
Given a file:
# configuration file for newsyslog
# $FreeBSD: /repoman/r/ncvs/src/etc/newsyslog.conf,v 1.50 2005/03/02 00:40:55 brooks Exp $
#
# Entries which do not specify the '/pid_file' field will cause the
# syslogd process to be signalled when that log file is rotated. This
# action... (10 Replies)
Discussion started by: jnojr
10 Replies
3. UNIX for Dummies Questions & Answers
I want to keep string/varible length to 10 even its actual length is less than 10(may be no value). so, i want to add trailing spaces to my string. :wall:
"typeset -L10 myvarible" is not working, its saying invalid typset -L option.
Can you please advise. (4 Replies)
Discussion started by: djaks111
4 Replies
4. UNIX for Dummies Questions & Answers
Hi All.
How can I convert this:
ABC_1_1
ABC_1_2
ABC_1_3
into this:
ABC_1 1
ABC_1 2
ABC_1 3
I tried this command but it is not working:
awk '{sub(/+$/,"\t", $1)}{print}'
Any suggestions on how to fix this?
Thank you :wall:
Please use code tags when posting data and... (3 Replies)
Discussion started by: danieladna
3 Replies
5. Shell Programming and Scripting
I am trying to change the date format for the following:
YESTER=`TZ=aaa24 date +%b" "%d | sed 's/0/ /'`
TraceList=$(ls -ltR /pdt/logs | grep "$YESTER" | awk '{print $9}')
CMD2=$(find /disk/dan/dansFiles/pass/logs/$TList -name cmd\* -prune)
what I am trying to do in the above... (1 Reply)
Discussion started by: ther2000
1 Replies
6. 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
7. Shell Programming and Scripting
I am getting a value from a csv file using CUT command, however the command extracting the records with trailing spaces. I am using the result into a sql session to fetch data, because of the trailing spaces the sql session is unable to fetch any data.
Please let me know, how to remove this... (2 Replies)
Discussion started by: mady135
2 Replies
8. Shell Programming and Scripting
Unix gurus,
I have a file as below, which is basically the result set obtained from a sql query on an Oracle database.
ID PROG_NAME USER_PROG_NAME
-------- --------------- ----------------------------------------
33045 INCOIN Import Items
42690 ... (3 Replies)
Discussion started by: sunpraveen
3 Replies
9. Shell Programming and Scripting
I'm using this thread as an example, but can't seem to apply it to my situation.
I'm trying to strip the trailing slash (/) from an input argument. Here's a snippet of my command line input and the troublesome code:
$ script_name -s "../pathname/dir/"
snip 8< ...
while getopts :s:... (5 Replies)
Discussion started by: ricksj
5 Replies
10. Shell Programming and Scripting
Hi All
I want to delete trailing zeros from varible.
ex:
if variable value is 1234.567000 result as 1234.567
if variable has 1234.0000 result as 1234
if variable as abcd.fgh result as abcd.fgh
Can somone give me a solution using awk? (16 Replies)
Discussion started by: Chandu2u
16 Replies