Search Results

Search: Posts Made By: anshu ranjan
3,126
Posted By RavinderSingh13
Hello anshu ranjan, Could you please try...
Hello anshu ranjan,

Could you please try following and let me know if this helps.

awk '{sub(/\/[^|]*/,"");print}' Input_file
Thanks,
R. Singh
13,943
Posted By RavinderSingh13
Hello anshu ranjan, Could you please try...
Hello anshu ranjan,

Could you please try following.

sed "s/^/'/g;s/$/';/g" Input_file
Output will be as follows.

'Member Analytics Engine';
'Enterprise Manager';
'Dev Tutorial';
...
1,319
Posted By RudiC
As date arithmetics are not that easily done, and...
As date arithmetics are not that easily done, and my mawk doesn't support dates at all, I'll propose a shell script for you:NOW=$(date +%s)
D15=$((86400*15))
while IFS="=" read A B; do [ "$A" ==...
968
Posted By RudiC
Please use code tags, not icode tags! The...
Please use code tags, not icode tags!

The effect that bothers you is one of the drawbacks of the for construct, as it can't tell spaces embedded in lines/variables from item separators. Two while...
968
Posted By SriniShoo
#!/bin/ksh while read user do while read...
#!/bin/ksh
while read user
do
while read proj nm
do
echo "Delete user profile \"${user}\" FROM ${proj} ${nm}"
done < file2
done <file1 > OP1

Ignore this..I haven't seen the...
968
Posted By RavinderSingh13
Hello Anshu, You can try following and let...
Hello Anshu,

You can try following and let me know if this helps you.

while read line1; do while read line2; do echo "Delete User Profile \"$line1\" FROM $line2"; done < "file2"; done < "file1"...
1,674
Posted By RavinderSingh13
Hello Anshu Rajan, Kindly use code tags for...
Hello Anshu Rajan,

Kindly use code tags for commands/inputs/codes used in your posts in spite of HTML codes. Could you please try following and let me know if that helps.

awk -F"|" -vvar=5...
1,674
Posted By bakunin
I suggest to read the man page of sed, especially...
I suggest to read the man page of sed, especially the part about "one-address-commands".

I hope this helps.

bakunin
1,725
Posted By RudiC
In recent shells, tryfor (( i=1; i<=16; i++ ));...
In recent shells, tryfor (( i=1; i<=16; i++ )); do echo $DATE >> file1; done
1,725
Posted By Scrutinizer
@Akshay, only the second option wil work if any...
@Akshay, only the second option wil work if any of the names contain spaces, and only if "$filesystems/$project" is in double quotes..
1,725
Posted By Akshay Hegde
Try : for i in $(cat filesystems_file); do ...
Try :

for i in $(cat filesystems_file); do

for j in $(cat project_file); do
echo du -h $i/$j
done
done

OR

while read filesystems; do
...
1,365
Posted By MadeInGermany
Delete the continue
Delete the continue
3,946
Posted By ygemici
awk '{print $1 " &&echo \"scp done\" >>...
awk '{print $1 " &&echo \"scp done\" >> out.txt"}' file1 > file2
3,946
Posted By Corona688
You certainly don't need to build shell scripts...
You certainly don't need to build shell scripts inside awk to do that.

while read LINE
do
"$LINE" && echo "$LINE: scp done"
done < file1 > out.txt
1,060
Posted By jayan_jay
$ awk -F/ '{print "/"$2"/"$3"/"$4"/config"}'...
$ awk -F/ '{print "/"$2"/"$3"/"$4"/config"}' infile
/java/usr/abc/config
/java/usr/xyz/config
/java/usr/ab12/config


---------- Post updated at 05:21 PM ---------- Previous update was at 05:16...
932
Posted By bartus11
paste -d" " file1 file2
paste -d" " file1 file2
201,325
Posted By Franklin52
To find whether a file has a CR or not you can...
To find whether a file has a CR or not you can use grep, this should print the lines with a CR:

grep '^M' file1Type <Ctr-v><Ctr-m> to get ^M and not a ^ and an M.

Regards
201,325
Posted By stanleypane
^M is a carriage return. You should...
^M is a carriage return.

You should understand a few things first:

CR = \r = Carriage Return
LF = \n = Line Feed

In DOS, all lines end with a CR/LF combination or \r\n.
In UNIX, all lines...
Showing results 1 to 18 of 18

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