Please help me in organizing the data in UNIX


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Please help me in organizing the data in UNIX
# 8  
Old 07-16-2015
You need to differentiate between shell's pattern matching (e.g. man bash), where * is a wild card character, and "POSIX.2 regular expressions" (man regex), where . is the wild card char, followed by * , a "repeater" meaning "zero or more occurrences".

_ is an undefined and thus empty variable giving an, as you call it, null substitution. Sort of sloppy programming, saving you from typing one char as opposed to "" .
This User Gave Thanks to RudiC For This Post:
# 9  
Old 07-16-2015
I don't know whether Ravinder is online or away, this may help you

. The period, or dot, matches any single character, including the newline character.

* This symbol means that the preceding regular expression is to be repeated as many times as necessary to find a match

_ is a variable, it contains nothing or it contains NULL because it is not set or defined anywhere before

Syntax : sub(/^.*=/,_) is same as sub(/^.*=/,"")

Last edited by Akshay Hegde; 07-16-2015 at 05:56 AM..
This User Gave Thanks to Akshay Hegde For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How can i run sql queries from UNIX shell script and retrieve data into text docs of UNIX?

Please share the doc asap as very urgently required. (1 Reply)
Discussion started by: 24ajay
1 Replies

2. Shell Programming and Scripting

help with organizing some non regular text

hey im trying to get the hex diffrences in two files ones called new and the other is named old i want it to phrase into my script, heres how i need the info: input='\x'94 #the new 1 byte hex change offset=00000000 #the 1st offset of the difference patch unset input offset input='\x'34... (5 Replies)
Discussion started by: lewisdenny
5 Replies

3. Programming

Organizing C++ Code

I have three directories CspInterp, FpnInterp and LinInterp. Each directory contains 4 .h and .ccp files describing 4 classes each CspInterp class CspFsInterp1d : public FsInterp1d class CspVsInterp1d : public VsInterp1d class CspFsInterp2d : public FsInterp2d class CspVsInterp2d : public... (10 Replies)
Discussion started by: kristinu
10 Replies

4. Shell Programming and Scripting

Organizing log

Hello, Following are the log of my sms application COMMAND: #tail -30 /var/log/smsd.log | grep Message_id | awk '{print $1,$2,$9}' OUTPUT: 2011-02-21 12:16:20,5, 03218975857, 2011-02-21 12:16:26,5, 03323048252, 2011-02-21 12:16:53,5, 03323048252, 2011-02-21 12:16:59,5,... (1 Reply)
Discussion started by: telnor
1 Replies

5. Shell Programming and Scripting

Organizing Files

Hi, I'm fairly new at scripting. I need to write a script that takes files from a source directory puts them in a target directory and sorts them by artist name. This is what I have so far #!/bin/bash source_dir='/home/tcindy/songs' target_dir='/home/tcindy/music' for path in... (2 Replies)
Discussion started by: tcindy
2 Replies

6. Shell Programming and Scripting

Organizing a log

I have a bunch of log files generated from a shell script, its all of my facebook friends and if theyre logged in. Each file is a different person. It runs every 5 minutes. The log file is just the date and time, then 1 if theyre logged in or 0 if theyre not. part of one of the files is: Mon Aug... (5 Replies)
Discussion started by: killer54291
5 Replies

7. Shell Programming and Scripting

Help organizing a music directory with sub directories.

Hello all, I used to have a great script and I lost it :( What the script did was searched a directory named say "music" It searched all sub directories for .mp3 files Then placeed all the .mp3's into a directory of the band name It also renamed the .mps "track#, band name, album name" (I... (9 Replies)
Discussion started by: komputersman
9 Replies

8. UNIX for Dummies Questions & Answers

Validating XSL sheet data in Unix Data file

Dear All, Need your help. In my day to day activities I have to validate/search Excel Sheet data (eg.say Application No. 0066782345) data into the Unix environment file whether the same data is present in that file or not. There are hundreds of records coming in excel file and I am doing grep... (1 Reply)
Discussion started by: ravijunghare
1 Replies

9. UNIX for Advanced & Expert Users

how to read the data from an excel sheet and use those data as variable in the unix c

I have 3 columns in an excel sheet. c1 c2 c3 EIP_ACCOUNT SMALL_TS_01 select A.* from acc; All the above 3 col shoud be passed a variable in the unix code. 1.How to read an excel file 2.How to pass these data as variable to the unic script (1 Reply)
Discussion started by: Anne Grace
1 Replies
Login or Register to Ask a Question