10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi everyone,
I have a situation in which I have multiple (3 at last count) date columns in a CSV file (, delim), which need to be changed from:
January 1 2017 (note, no comma after day)
to:
YYYY-MM-DD
So far, I am able to convert a date using:
date --date="January 12, 1990" +%Y-%m-%d
... (7 Replies)
Discussion started by: richardsantink
7 Replies
2. UNIX for Dummies Questions & Answers
Options::
A)$shell
B)echo $ bash
C)echo $ O
D)$ O (1 Reply)
Discussion started by: raghugowda
1 Replies
3. Shell Programming and Scripting
I am going to provide a chunks of codes that I do not understand. Please help with them in a layman's terms.
1) ${DEBUG:-0}
--------------------------------------------------------------------------
2) print "${1}"
... (7 Replies)
Discussion started by: lg123
7 Replies
4. Homework & Coursework Questions
Please take a look I am stuck on step 4
1. The problem statement, all variables and given/known data:
#!/bin/bash
### ULI101 - ASSIGNMENT #2 (PART A) - DUE DATE Wed, Aug 3, 2011, before 12 midnight.
###====================================================================================
###... (13 Replies)
Discussion started by: almirzaee
13 Replies
5. Shell Programming and Scripting
It's perhaps a dummy question... but I don't find my way!
1) When I put the date command in a variable, it is ok and here the code :
WEEK_DAY=`date +%w`
DAY=`date +%Y%m%d`
echo WEEK_DAY : "$WEEK_DAY"
echo DAY : "$DAY"
2) I should to get direct the date and not in a variable, like :
echo... (3 Replies)
Discussion started by: hiddenshadow
3 Replies
6. Shell Programming and Scripting
Hi all. Suppose I have the following function in an executable file named "HOLA":
------------------------
function hola { echo "Hola ${@}."; }
------------------------
In addition, suppose that I want to execute the file so I can input my name next to ./HOLA. I mean,... (4 Replies)
Discussion started by: hresquivelo
4 Replies
7. UNIX for Dummies Questions & Answers
Hey all,
I need to know how many lines of C code are in a source bundle. I have extracted the bundle and hence there is a big directory tree with C files everywhere.
So far I have something like:
find . -name "*.c" | grep \ ./*/*/*/*/*/*
obviously wrong, if someone could help me out... (3 Replies)
Discussion started by: zigga15
3 Replies
8. UNIX for Dummies Questions & Answers
is there a different command to display contents of a file on the output in bash shell? i tried more and it does not work. (7 Replies)
Discussion started by: npatwardhan
7 Replies
9. Shell Programming and Scripting
I am having trouble running a .sh file. The code 'x=${file_name:0:$z-11}' is giving me a bad substitution error. However when I run in BASH it works. Thing is when this goes to production the .sh will not be running in BASH. Is there a way to substring a string not in BASH or a way to invoke... (2 Replies)
Discussion started by: edwardtk11
2 Replies
10. Shell Programming and Scripting
Hi,
I am trying to write script to copy some files(/ppscdr/cdrp2p/temp/) from one directory to another directory using shell script. see the script below,
#!/bin/sh -f
dir_name=20061105
mkdir ${dir_name}
cd /ppscdr/cdrp2p/temp
pwd
cp p2p${dir_name}*.*... (4 Replies)
Discussion started by: maheshsri
4 Replies