10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello.
I can use any particular (stupid or not) format when using bash date command.
Example :
~> date --date "now" '+%Y-%m-%d %H!%M!%S'
2019-06-03 12!55!33or
~> date --date "now" '+%Y£%m£%d %H¤%M¤%S'
2019£06£03 12¤57¤36
or
~> date --date "now" '+%Y-%m-%d %H-%M-%S'
2019-06-03 12-58-51
... (4 Replies)
Discussion started by: jcdole
4 Replies
2. Shell Programming and Scripting
Hi All,
I have a file with 20 columns, and the data itself has "\n" new line in it. So we have changed the row delimiter to ^E.
Now i am unable to use head, wc -l etc... Please let me know how to change the line separator temporarily to run these unix commands.
Thanks. (1 Reply)
Discussion started by: baranisachin
1 Replies
3. Shell Programming and Scripting
Hi Seders,
i am new to this forum, but i think it's quite the best place to post.
So, here is my pb :
I have a csv file, with comma separator and text enclosed by ".
First pb is with text in " ......... ", wich sometimes includes lines break, and commas
And to complicate a little more,... (4 Replies)
Discussion started by: yogeek
4 Replies
4. Shell Programming and Scripting
I have 100 files in a directory , all the files have a word "error" and they are created in different date . Now I would like to change the word from "error" to "warning" , and keep the date of the files ( that means do not change the file creation date after change the word ) , can advise what can... (0 Replies)
Discussion started by: ust3
0 Replies
5. Shell Programming and Scripting
My txt file consists of records with 6 numbers followed by 3 characters.
Is there a simple “sed” which will insert a | separator between the 6th and 7th position ?
Many thanks (3 Replies)
Discussion started by: malts18
3 Replies
6. Shell Programming and Scripting
I have a website. I have a directory within it with over a hundred .html files. I need to change a date within every file. I don't have an easy way to find/replace.
I need to change 10/31 to 11/30 on every single page at once. I tried the command below but it didn't work. Obviously I don't know... (3 Replies)
Discussion started by: ijustsawmars
3 Replies
7. UNIX for Dummies Questions & Answers
Hi All,
I have the following data in a korn shell variable:
a="FirstValue|SecondValue|ThirdValue"
The value between "FirstValue", "SecondValue" and "ThirdValue" can change, in this case is a comma: "," and I need to print it only once. I need to know what is the separator value.
I... (3 Replies)
Discussion started by: felipe.vinturin
3 Replies
8. Shell Programming and Scripting
Hi All,
I was wondering if anyone knew how to dynamically change the FS in awk to accept vairiable containing a field separator. the current code is as below and does not work when i introduce the dynamic FS change :-(
validate_source_file()
{
source_file=$1
... (2 Replies)
Discussion started by: satnamx
2 Replies
9. UNIX for Dummies Questions & Answers
Hi, All,
I wonder how to change the field separator of grep from : to space when use grep to display.
for example when I use
grep -e 'pattern1' -e 'pattern2' -n filename
to find patterns, it use : to separate patterns, but I want to use blank space. is there an option I can set to... (2 Replies)
Discussion started by: Jenny.palmy
2 Replies
10. UNIX for Dummies Questions & Answers
Assume, I created one file three years back and I like to move the file to some other directory with the old date (Creation date)? Is it possible? Explain? (1 Reply)
Discussion started by: jee.ku2
1 Replies