Dear all,
I got a flat file (test.txt) generated in solaris unix box attached .
I have a little project to build bash script that search in the OS ( Linux/Solaris ) the current IP address from files and replace them with other IP address.
The problem is that IP address could be in text file or in not text file as binary/data files, etc.
I use the command:
file –mime $PATH ( --mime is valid only for Linux )
In order to verify if file is text file, or not text file ( as bi
Hi Gurus,
I am working on a script that sends a text file attachment on mail from unix server to my widows outlook mail box.
When i see the text file in UNIX it is perfectly formatted but when i open the same file in the mail, it looks weird as the next line is added to the same line.
For example, in unix the file looks like,
Code:
ABC#DEF
GHI#JKL
MNO#PQR
But the mail attachment looks lik
Hello,
I am new to Unix and hoping that someone could help me with this.
I am trying to get the names of files present in the particular folder to a text file and store that file to a unix location.
For that I am using the ftp command .
now all the code till the accessing te share drive is working (cd share drive location), but after that I am using a command-
cd 'directory share drive
put 'ls > /data209/abc/abc.txt(unix location)'
but this is not working and I a
Hi ,
Could you please guide me how to remove formatting (bold text) in a unix file?
vi editor showing like this...
Code:
^[[1mtl21ss01^[[0m
^[[1mtl21ss02^[[0m
^[[1mtl21ss03^[[0m
Cat command showing like this...
Code:
tl21ss01
tl21ss02
tl21ss03
In unix shell, I have a txt file (Price.txt) that contain following information:
Buy value: 15
Sell value: 30
May I know how to use the command that can grep the buy value and sell value(in integer) and then do the difference between them, store in a new variable?
I have a flat file with the 3 columns and separate by tab delimiter, and the last column with special character.
A B [abc3]
C D [def4]
F G [ghi5]
Now I would like to swap the third column with second column to following format:
A [abc3] B
C [def4] D
F [mip5] G
I know this cannot be done in Unix command with using cut command.
Please advise.
Hi Everyone
I am new to Unix shell scripting
Can anyone please explain me in detail how this command works
Code:
awk -F@ 'NR==FNR{A[$1]=$2;next}$3 in A{$3=A[$3]}1' file2 file1
The above command I got it from this forum, but unable to implement it as I am not getting how this works:mad:
I have two files abc.txt and xyz.txt
abc.txt
Code:
1,2,3,4
5,6,7,8
9,0,1,2
xyz.txt