Search Results

Search: Posts Made By: Vidhyaprakash
821
Posted By vgersh99
sed 's#\\#/#g' myFile
sed 's#\\#/#g' myFile
821
Posted By elixir_sinari
sed 's:\\:/:g' file or sed 'y:\\:/:' file
sed 's:\\:/:g' file
or
sed 'y:\\:/:' file
821
Posted By in2nix4life
Add a -i.bkup if you want to backup the original...
Add a -i.bkup if you want to backup the original file and then write the changes to it:


sed -i.bkup 's|\\|\/|g' file

cat file
1578449...
821
Posted By jville
cat filename | tr '\\' '/' > filename.mod
cat filename | tr '\\' '/' > filename.mod
2,485
Posted By balajesuri
If a parameter is given along with a script name...
If a parameter is given along with a script name while invoking it, then that parameter is considered, otherwise 'today' would contain `date +%y%m%d`.

For e.g., consider this script:
#! /bin/bash...
8,760
Posted By birei
Maybe an older version of awk takes RS as a...
Maybe an older version of awk takes RS as a regular expression and matches it with the beginning of each line.

How about trying to substitute ^ with other strange char in your input file and in...
8,760
Posted By Corona688
Or RS="[^]"
Or RS="[^]"
8,760
Posted By birei
That assignment gives error, because it...
That assignment gives error, because it understands ^] as "except ]". It could be RS="[\\^]"

$ LANG=en awk 'BEGIN {RS="[^]"; FS="#";} { print $2}' 123456
awk: cmd. line:1: fatal: Unmatched [ or...
8,760
Posted By Scrutinizer
I tried: awk '{print $2}' FS=# RS=^ infile ...
I tried:
awk '{print $2}' FS=# RS=^ infile
and it worked on various awks.
What awk are you using?. Are you on Solaris? => use /usr/xpg4/bin/awk instead
8,760
Posted By birei
Hi Vidhyaprakash, I only can say that it...
Hi Vidhyaprakash,

I only can say that it works as expected in my system:

$ awk --version | head -1 ...
Showing results 1 to 10 of 10

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