10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I am running a command that is part of a script and this is what I am getting when it is sorted by the command:
command:
ls /tmp/test/*NDMP*.z
/tmp/test/CARS-GOLD-NET_CHROMJOB-01-XZ-ARCHIVE-NDMP.z
/tmp/test/CARS-GOLD-NET_CHROMJOB-01-XZ-NDMP.z... (2 Replies)
Discussion started by: newbie2010
2 Replies
2. UNIX for Beginners Questions & Answers
Hi,
I am trying to add few (say 3 days) to sysdate using -
date -d '+ 3 days' +%y%m%d
and it works as expected.
But how to add few (say 3 days) to a literal date value and how bash treats a literal value as a date. Can we say just like in ORACLE TO_DATE that my given literal date value... (2 Replies)
Discussion started by: pointers1234
2 Replies
3. Shell Programming and Scripting
I have a report that I'd like to print columns headers on. The code appears as follows:
gawk '{for (i=1; i<=NF; i++) if ($i < 0) $i = -$i; print }'|gawk '{ printf "%-78s%-30s%-30s%-30s\n", $1,$2, $3, $4 }' |awk '{for (i=1; i<=NF; i++) if ($i < 0) $i = -$i; print }' report_1020I am trying to make... (3 Replies)
Discussion started by: newbie2010
3 Replies
4. Shell Programming and Scripting
I have an output file .dat. From this file i have to do a distinct of the ID using the sort uniq command in bash script. How can i do it? i found :
sort -u ${FILEOUT_DAT}
but i don't think is my solution because the id isn't specified.. is there other solution? (7 Replies)
Discussion started by: punticci
7 Replies
5. Shell Programming and Scripting
Hi Experts,
I have a filelist collected from another server , now want to sort the output using date/time stamp filed.
- Filed 6, 7,8 are showing the date/time/stamp.
Here is the input:
#----------------------------------------------------------------------
-rw------- 1 root ... (3 Replies)
Discussion started by: rveri
3 Replies
6. UNIX for Advanced & Expert Users
Hello all -
I am to this forum and fairly new in learning unix and finding some difficulty in preparing a small shell script. I am trying to make script to sort all the files given by user as input (either the exact full name of the file or say the files matching the criteria like all files... (3 Replies)
Discussion started by: pankaj80
3 Replies
7. Shell Programming and Scripting
*This is not homework I am new to UNIX and want to try this Monitoring a file demo*
*If this is the wrong forum please move it - im new to the forums*
$1 = the file to be monitored
$2 = the time for the file to sleep
If the file gets changed (using -nt) it will send my username mail saying... (2 Replies)
Discussion started by: Nolan-
2 Replies
8. Shell Programming and Scripting
I am writing a script to write to and a sort txt file. After I sort the file I want to add 2 to each line of the file. My script thus far is
#!/bin/bash
cat > /ramdisk/home/stux/unsortedints.out
COUNT=0
FILE =/ramdisk/home/stux/unsortedints.out
for i in {1..100}
do
NUMBER = $
echo $NUMBER... (3 Replies)
Discussion started by: puttyirc
3 Replies
9. Shell Programming and Scripting
Hello all,
I am trying to write a simple script that will parse through a text/properties file and check a couple of if statements.
Here is what I have so far:
FILENAME=$1
while read line
do
echo $line
done < $FILENAME
When I call ./simple.sh testfile.txt I recieve a file or... (7 Replies)
Discussion started by: lamagra
7 Replies
10. Shell Programming and Scripting
I did a search on this, and found lots on SORT but no answer to my question.
I have a C program that fetches all of our users from Netware, and I have that it makes a file that I later include in a html as a select tag drop-down menu.
Here is what 1 line looks like:
<option... (5 Replies)
Discussion started by: booboo
5 Replies