12-30-2014
Cat command not working to display Mac file in Ubuntu
Hi,
Recently I got a .txt file from Mac user. when I try to open it in my Ubuntu machine using cat command it is not displaying any content of file however I can see the content using vi.
Anyone know How to see its content using cat as I have to process it in my shell script.
Thanks in Advance.
8 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I have a .txt file
Sample:
=====================
NEXT HOST
=====================
AEADBAS001
ip access-list extended BLA_Incoming_Filter
ip access-list extended BLA_Outgoing_Filter
access-list 1 permit xxxxxxxxxxxxxx
access-list 2 permit xxxxxxxxxxxxxx
=====================... (4 Replies)
Discussion started by: I-1
4 Replies
2. Shell Programming and Scripting
Hello,
So I sorted my file as I was supposed to:
sort -n -r -k 2 -k 1 file1 | uniq > file2
and when I wrote
> cat file2
in the command line, I got what I was expecting, but in the script itself
...
sort -n -r -k 2 -k 1 averages | uniq > temp
cat file2
It wrote a whole... (21 Replies)
Discussion started by: shira
21 Replies
3. OS X (Apple)
I've been trying to figure this out since last night, and I'm just stumped. The last time I did any shell scripting was 8 years ago on a Unix box, and it was never my strong suit. I'm on a Mac running Leopard now. Here's my dilemma - hopefully someone can point me in the right direction.
I'm... (10 Replies)
Discussion started by: Daniel M. Clark
10 Replies
4. UNIX for Dummies Questions & Answers
Hello ,
I am newbie to UNIX platform .
I have read that there are two ways of creating files that is using
1.) Cat 2.) touch .
With Cat Command i am unable to create a File , i is saying No file or Directory exists
I logged in with root as user .
please help (7 Replies)
Discussion started by: Ravi Pavanv
7 Replies
5. Shell Programming and Scripting
Hi, I have a question.
I define a function using sed command:
replace()
{
searchterm=$1
replaceterm=$2
sed -e "s/$searchterm/$replaceterm/ig" $3 > $WORK'tempfile.tmp'
mv $WORK'tempfile.tmp' $3
}
Then I call
replace 'test = 0' 'test = 1' $myfileThis code works well in... (1 Reply)
Discussion started by: Dark2Bright
1 Replies
6. Shell Programming and Scripting
Hi, I have a question.
I define a function using sed command:
replace()
{
searchterm=$1
replaceterm=$2
sed -e "s/$searchterm/$replaceterm/ig" $3 > $WORK'tempfile.tmp'
mv $WORK'tempfile.tmp' $3
}
Then I call
replace 'test = 0' 'test = 1' $myfile
This code... (1 Reply)
Discussion started by: Dark2Bright
1 Replies
7. UNIX for Advanced & Expert Users
Hi,
I want to add the library in my configure file. i am doing it using autoconf in ubuntu. I am new to the autoconf.
Can anyone please let me know how to add the library using configure file so that it can linked to my software which I am using?
Thanks in advance!!!!! (0 Replies)
Discussion started by: diehard
0 Replies
8. UNIX for Beginners Questions & Answers
Hello,
I am on a Mac and trying to clean up some monthly files with a very simple SED:
sed '3,10d;/<ACROSS>/,$d' input.txt > output.txt
(from the input, delete lines 3 - 10; then delete from the line containing <ACROSS> to the end of the file)
then output to output.txt
Even when I try... (2 Replies)
Discussion started by: verbatim
2 Replies
LEARN ABOUT MOJAVE
assetcachemanagerutil
AssetCacheManagerUtil(8) BSD System Manager's Manual AssetCacheManagerUtil(8)
NAME
AssetCacheManagerUtil -- control the macOS Content Cache
SYNOPSIS
AssetCacheManagerUtil [-a|--all] [-j|--json] [-l|--linger] command
DESCRIPTION
AssetCacheManagerUtil controls the macOS Content Cache. AssetCacheManagerUtil must be run by root except as noted below. The options are:
-a|--all Show all events, not just the end result of the specified command.
-j|--json Print results in machine-parseable JSON format to stdout.
-l|--linger Linger after completing command, to show other events.
The commands are:
activate Activates the content cache. Content caching is deactivated by default. After you activate content caching, restart devices
on your network to take advantage of content caching immediately. Devices on your network will discover this content cache
over time. Devices that are restarted will use this content cache immediately.
deactivate Deactivates the content cache.
isActivated Reports the content cache's activation status. Does not require root.
canActivate Reports whether the content cache is eligible for activation. Does not require root.
flushCache Flushes the content cache.
flushPersonalCache
Flushes all personal (iCloud) content from the content cache.
flushSharedCache
Flushes all shared (non-iCloud) content from the content cache.
status Reports the content cache's status. Does not require root.
settings Reports the content cache's settings. Does not require root.
reloadSettings
Forces the content cache to reload its settings.
moveCacheTo path
Moves the cache to path. The path must end with /Library/Application Support/Apple/AssetCache/Data. The contents of path are
deleted and replaced with the cache.
absorbCacheFrom path read-only|and-destroy
Imports the cache from path. The path must end with either /Library/Application Support/Apple/AssetCache/Data or
/Library/Server/Caching/Data. If the last argument is read-only the cache at path is not modified, otherwise it is emptied.
This command only starts the absorption, which proceeds and finishes in the background.
SEE ALSO
System Preferences > Sharing > Content Caching, AssetCache(8), AssetCacheLocatorUtil(8), AssetCacheTetheratorUtil(8)
macOS June 1, 2019 macOS