Search Results

Search: Posts Made By: pankaj_tarale
2,905
Posted By pankaj_tarale
Hi, ls | rm `grep -xFf file.txt` will works...
Hi,

ls | rm `grep -xFf file.txt` will works with deletions too.

Here x stand for exact match from file , f for input from file and F with Fixed string separated by new line.

-Pankaj
6,710
Posted By pankaj_tarale
Counting lines by Awk
awk 'END { print NR }' file
13,430
Posted By pankaj_tarale
Hi , For removing CTRL ^M character you need...
Hi ,

For removing CTRL ^M character you need to user below commands

For Vi editor
%s/^M//g
By sed command
sed 's/^M//g' <filename>

Another way by tr command
tr -d '\r' <filename>
...
Forum: Fedora 05-10-2012
6,078
Posted By pankaj_tarale
For any other shell you can use the bc as below. ...
For any other shell you can use the bc as below.

ABCDJ=0.5 |bc
GHIJJ=0.75 |bc
if [[ ${ABCDJ} -le 0 || ${GHIJJ} -ge 1 ]]; then
echo hello
fi

-Pank's
4,194
Posted By pankaj_tarale
Hey Gray, It seems to be very funny ..but...
Hey Gray,

It seems to be very funny ..but easy to learn.

-Pank's
2,879
Posted By pankaj_tarale
Hi Ajay, Below is your answer by sed for date ....
Hi Ajay,
Below is your answer by sed for date .

#!/bin/bash

searchdate=$(date +%d/%m/%Y)

sed -i "s|^| $searchdate |" myfile


While number or character you can do directly as...
Showing results 1 to 6 of 6

 
All times are GMT -4. The time now is 03:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy